From: Evan You Date: Fri, 17 Nov 2023 09:46:47 +0000 (+0800) Subject: wip: pass all non-error parsing tests X-Git-Tag: v3.4.0-alpha.2~43 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e05ba29555c8697d88019d55162cfbbb8e9d8f82;p=thirdparty%2Fvuejs%2Fcore.git wip: pass all non-error parsing tests --- diff --git a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap index e4728a4610..bc94557de7 100644 --- a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap @@ -1,6656 +1,5 @@ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html -exports[`compiler: parse > Errors > ABRUPT_CLOSING_OF_EMPTY_COMMENT > 1`] = ` -{ - "cached": 0, - "children": [ - { - "children": [ - { - "content": "", - "loc": { - "end": { - "column": 16, - "line": 1, - "offset": 15, - }, - "source": "", - "start": { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 3, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": [], - "directives": [], - "helpers": Set {}, - "hoists": [], - "imports": [], - "loc": { - "end": { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse > Errors > ABRUPT_CLOSING_OF_EMPTY_COMMENT > 1`] = ` -{ - "cached": 0, - "children": [ - { - "children": [ - { - "content": "", - "loc": { - "end": { - "column": 17, - "line": 1, - "offset": 16, - }, - "source": "", - "start": { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 3, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 28, - "line": 1, - "offset": 27, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": [], - "directives": [], - "helpers": Set {}, - "hoists": [], - "imports": [], - "loc": { - "end": { - "column": 28, - "line": 1, - "offset": 27, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse > Errors > ABRUPT_CLOSING_OF_EMPTY_COMMENT > 1`] = ` -{ - "cached": 0, - "children": [ - { - "children": [ - { - "content": "", - "loc": { - "end": { - "column": 18, - "line": 1, - "offset": 17, - }, - "source": "", - "start": { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 3, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 29, - "line": 1, - "offset": 28, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": [], - "directives": [], - "helpers": Set {}, - "hoists": [], - "imports": [], - "loc": { - "end": { - "column": 29, - "line": 1, - "offset": 28, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse > Errors > CDATA_IN_HTML_CONTENT > 1`] = ` -{ - "cached": 0, - "children": [ - { - "children": [ - { - "content": "[CDATA[cdata]]", - "loc": { - "end": { - "column": 28, - "line": 1, - "offset": 27, - }, - "source": "", - "start": { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "type": 3, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 39, - "line": 1, - "offset": 38, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": [], - "directives": [], - "helpers": Set {}, - "hoists": [], - "imports": [], - "loc": { - "end": { - "column": 39, - "line": 1, - "offset": 38, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse > Errors > CDATA_IN_HTML_CONTENT > 1`] = ` -{ - "cached": 0, - "children": [ - { - "children": [ - { - "children": [ - { - "content": "cdata", - "loc": { - "end": { - "column": 30, - "line": 1, - "offset": 29, - }, - "source": "cdata", - "start": { - "column": 25, - "line": 1, - "offset": 24, - }, - }, - "type": 2, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 39, - "line": 1, - "offset": 38, - }, - "source": "cdata", - "start": { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "ns": 1, - "props": [], - "tag": "svg", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 50, - "line": 1, - "offset": 49, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": [], - "directives": [], - "helpers": Set {}, - "hoists": [], - "imports": [], - "loc": { - "end": { - "column": 50, - "line": 1, - "offset": 49, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse > Errors > DUPLICATE_ATTRIBUTE > 1`] = ` -{ - "cached": 0, - "children": [ - { - "children": [ - { - "children": [], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 34, - "line": 1, - "offset": 33, - }, - "source": "
", - "start": { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "ns": 0, - "props": [ - { - "loc": { - "end": { - "column": 21, - "line": 1, - "offset": 20, - }, - "source": "id=\\"\\"", - "start": { - "column": 16, - "line": 1, - "offset": 15, - }, - }, - "name": "id", - "type": 6, - "value": { - "content": "", - "loc": { - "end": { - "column": 21, - "line": 1, - "offset": 20, - }, - "source": "\\"\\"", - "start": { - "column": 19, - "line": 1, - "offset": 18, - }, - }, - "type": 2, - }, - }, - { - "loc": { - "end": { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "id=\\"\\"", - "start": { - "column": 22, - "line": 1, - "offset": 21, - }, - }, - "name": "id", - "type": 6, - "value": { - "content": "", - "loc": { - "end": { - "column": 27, - "line": 1, - "offset": 26, - }, - "source": "\\"\\"", - "start": { - "column": 25, - "line": 1, - "offset": 24, - }, - }, - "type": 2, - }, - }, - ], - "tag": "div", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 45, - "line": 1, - "offset": 44, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": [], - "directives": [], - "helpers": Set {}, - "hoists": [], - "imports": [], - "loc": { - "end": { - "column": 45, - "line": 1, - "offset": 44, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse > Errors > END_TAG_WITH_ATTRIBUTES > 1`] = ` -{ - "cached": 0, - "children": [ - { - "children": [ - { - "children": [], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 28, - "line": 1, - "offset": 27, - }, - "source": "
", - "start": { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "ns": 0, - "props": [], - "tag": "div", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 39, - "line": 1, - "offset": 38, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": [], - "directives": [], - "helpers": Set {}, - "hoists": [], - "imports": [], - "loc": { - "end": { - "column": 39, - "line": 1, - "offset": 38, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse > Errors > END_TAG_WITH_TRAILING_SOLIDUS > 1`] = ` -{ - "cached": 0, - "children": [ - { - "children": [ - { - "children": [], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 23, - "line": 1, - "offset": 22, - }, - "source": "
", - "start": { - "column": 11, - "line": 1, - "offset": 10, - }, - }, - "ns": 0, - "props": [], - "tag": "div", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "isSelfClosing": false, - "loc": { - "end": { - "column": 34, - "line": 1, - "offset": 33, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "ns": 0, - "props": [], - "tag": "template", - "tagType": 0, - "type": 1, - }, - ], - "codegenNode": undefined, - "components": [], - "directives": [], - "helpers": Set {}, - "hoists": [], - "imports": [], - "loc": { - "end": { - "column": 34, - "line": 1, - "offset": 33, - }, - "source": "", - "start": { - "column": 1, - "line": 1, - "offset": 0, - }, - }, - "temps": 0, - "type": 0, -} -`; - -exports[`compiler: parse > Errors > EOF_BEFORE_TAG_NAME >