diff --git a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap index f9e949bc6..ebee2f72f 100644 --- a/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap +++ b/packages/compiler-core/__tests__/__snapshots__/parse.spec.ts.snap @@ -7523,3 +7523,7527 @@ Object { "type": 0, } `; + +exports[`compiler: parse Errors ABRUPT_CLOSING_OF_EMPTY_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABRUPT_CLOSING_OF_EMPTY_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABRUPT_CLOSING_OF_EMPTY_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "attr=\\"c\\"", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "name": "attr", + "type": 5, + "value": Object { + "content": "c", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "\\"c\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + "offset": 21, + }, + "source": "attr=\\"a;\\"", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "name": "attr", + "type": 5, + "value": Object { + "content": "a;", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 22, + "line": 1, + "offset": 21, + }, + "source": "\\"a;\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + "source": "attr=\\"ÿ\\"", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "name": "attr", + "type": 5, + "value": Object { + "content": "ÿ", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + "source": "\\"ÿ\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + "offset": 35, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 36, + "line": 1, + "offset": 35, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "attr=\\"g;\\"", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "name": "attr", + "type": 5, + "value": Object { + "content": "g;", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "\\"g;\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE c 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "c", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "c", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "c", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "c", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE a; 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "a;", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "source": "a;", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "a;", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "a;", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE ÿ 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "ÿ", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + "source": "ÿ", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "ÿ", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "ÿ", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE g; 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "g;", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "g;", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "g;", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "g;", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "[CDATA[cdata]]", + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CDATA_IN_HTML_CONTENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "cdata", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "cdata", + "start": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 1, + "tag": "svg", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + "offset": 49, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 50, + "line": 1, + "offset": 49, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "�", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + "offset": 31, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + "offset": 31, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CONTROL_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors CONTROL_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 17, + "line": 1, + "offset": 16, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors DUPLICATE_ATTRIBUTE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "source": "id=\\"\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "id", + "type": 5, + "value": Object { + "content": "", + "isEmpty": true, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "source": "\\"\\"", + "start": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + }, + "type": 2, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "id=\\"\\"", + "start": Object { + "column": 22, + "line": 1, + "offset": 21, + }, + }, + "name": "id", + "type": 5, + "value": Object { + "content": "", + "isEmpty": true, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "\\"\\"", + "start": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "
", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + "offset": 44, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 45, + "line": 1, + "offset": 44, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors END_TAG_WITH_ATTRIBUTES 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors END_TAG_WITH_TRAILING_SOLIDUS 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 34, + "line": 1, + "offset": 33, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors EOF_BEFORE_TAG_NAME < 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "<", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "source": "<", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "source": "<", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 12, + "line": 1, + "offset": 11, + }, + "source": "<", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors EOF_BEFORE_TAG_NAME 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors EOF_IN_CDATA 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "comment", + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + "offset": 36, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + "offset": 36, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "content": "DOCTYPE html", + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 3, + }, + ], + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "-", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors INCORRECTLY_OPENED_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "ELEMENT br EMPTY", + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + "offset": 40, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + "offset": 40, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME �> 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "�", + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "source": "�>", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "�>", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "�>", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME <�> 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "<�>", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 14, + "line": 1, + "offset": 13, + }, + "source": "<�>", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + "source": "<�>", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + "source": "<�>", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME {{a < b}} 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "a < b", + "isStatic": false, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + "offset": 19, + }, + "source": "{{a < b}}", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 4, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + "offset": 30, + }, + "source": "{{a < b}}", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + "offset": 30, + }, + "source": "{{a < b}}", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME a < b 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "a < b", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "a < b", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "a < b", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "a < b", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors INVALID_FIRST_CHARACTER_OF_TAG_NAME a b 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "a ", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + "source": "a ", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + Object { + "content": " b", + "start": Object { + "column": 13, + "line": 1, + "offset": 12, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "a b", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "a b", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors MISSING_ATTRIBUTE_VALUE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "source": "id= /", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "id", + "type": 5, + "value": Object { + "content": "/", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + "source": "/", + "start": Object { + "column": 20, + "line": 1, + "offset": 19, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 28, + "line": 1, + "offset": 27, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 39, + "line": 1, + "offset": 38, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors MISSING_ATTRIBUTE_VALUE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + "offset": 19, + }, + "source": "id= ", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "id", + "type": 5, + "value": undefined, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + "offset": 37, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 38, + "line": 1, + "offset": 37, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors MISSING_ATTRIBUTE_VALUE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + "source": "id=", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "id", + "type": 5, + "value": undefined, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + "offset": 36, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 37, + "line": 1, + "offset": 36, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors MISSING_END_TAG_NAME > 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + "source": ">", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 25, + "line": 1, + "offset": 24, + }, + "source": ">", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE ( 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "(", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "source": "(", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "(", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "(", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE @ 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "@", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + "source": "@", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "@", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 27, + "line": 1, + "offset": 26, + }, + "source": "@", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE & 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "&", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 15, + "line": 1, + "offset": 14, + }, + "source": "&", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "&", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 26, + "line": 1, + "offset": 25, + }, + "source": "&", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors MISSING_WHITESPACE_BETWEEN_ATTRIBUTES 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + "source": "id=\\"foo\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "id", + "type": 5, + "value": Object { + "content": "foo", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + "source": "\\"foo\\"", + "start": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + }, + "type": 2, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + "offset": 36, + }, + "source": "class=\\"bar\\"", + "start": Object { + "column": 1, + "line": 2, + "offset": 25, + }, + }, + "name": "class", + "type": 5, + "value": Object { + "content": "bar", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 12, + "line": 2, + "offset": 36, + }, + "source": "\\"bar\\"", + "start": Object { + "column": 7, + "line": 2, + "offset": 31, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 19, + "line": 2, + "offset": 43, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + "offset": 54, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 30, + "line": 2, + "offset": 54, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors MISSING_WHITESPACE_BETWEEN_ATTRIBUTES 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + "source": "id=\\"foo\\"", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "id", + "type": 5, + "value": Object { + "content": "foo", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + "source": "\\"foo\\"", + "start": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + }, + "type": 2, + }, + }, + Object { + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "class=\\"bar\\"", + "start": Object { + "column": 24, + "line": 1, + "offset": 23, + }, + }, + "name": "class", + "type": 5, + "value": Object { + "content": "bar", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "\\"bar\\"", + "start": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 42, + "line": 1, + "offset": 41, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + "offset": 52, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 53, + "line": 1, + "offset": 52, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors NESTED_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "a", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + "offset": 31, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 32, + "line": 1, + "offset": 31, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors NESTED_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "a", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + "offset": 39, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 40, + "line": 1, + "offset": 39, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors NESTED_COMMENT 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "a", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 3, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 35, + "line": 1, + "offset": 34, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors NONCHARACTER_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 20, + "line": 1, + "offset": 19, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + "offset": 30, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 31, + "line": 1, + "offset": 30, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors NONCHARACTER_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors NULL_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "�", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 18, + "line": 1, + "offset": 17, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 29, + "line": 1, + "offset": 28, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors SURROGATE_CHARACTER_REFERENCE 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "content": "�", + "isEmpty": false, + "loc": Object { + "end": Object { + "column": 19, + "line": 1, + "offset": 18, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "type": 2, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "a\\"bc=''", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "a\\"bc", + "type": 5, + "value": Object { + "content": "", + "isEmpty": true, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "''", + "start": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + "offset": 40, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + "offset": 40, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "a'bc=''", + "start": Object { + "column": 16, + "line": 1, + "offset": 15, + }, + }, + "name": "a'bc", + "type": 5, + "value": Object { + "content": "", + "isEmpty": true, + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "''", + "start": Object { + "column": 21, + "line": 1, + "offset": 20, + }, + }, + "type": 2, + }, + }, + ], + "children": Array [], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 30, + "line": 1, + "offset": 29, + }, + "source": "", + "start": Object { + "column": 11, + "line": 1, + "offset": 10, + }, + }, + "ns": 0, + "tag": "div", + "tagType": 0, + "type": 1, + }, + ], + "directives": Array [], + "isSelfClosing": false, + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + "offset": 40, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "ns": 0, + "tag": "template", + "tagType": 3, + "type": 1, + }, + ], + "loc": Object { + "end": Object { + "column": 41, + "line": 1, + "offset": 40, + }, + "source": "", + "start": Object { + "column": 1, + "line": 1, + "offset": 0, + }, + }, + "type": 0, +} +`; + +exports[`compiler: parse Errors UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME 1`] = ` +Object { + "children": Array [ + Object { + "attrs": Array [], + "children": Array [ + Object { + "attrs": Array [ + Object { + "loc": Object { + "end": Object { + "column": 23, + "line": 1, + "offset": 22, + }, + "source": "a