",
"\n ",
- "",
"\n ",
"\n
\n \n \n Hello
\n \n \n",
+ "text": "
\n \n \n \n Hello
\n \n \n ",
"children": [
{
"type": "VStartTag",
@@ -15,7 +15,7 @@
},
{
"type": "VElement",
- "text": "
\n \n \n Hello
\n \n ",
+ "text": "
\n \n \n Hello
\n \n ",
"children": [
{
"type": "VStartTag",
@@ -62,11 +62,11 @@
},
{
"type": "VElement",
- "text": "
\n Hello
\n ",
+ "text": "
\n Hello
\n ",
"children": [
{
"type": "VStartTag",
- "text": "
",
+ "text": "",
"children": []
},
{
@@ -102,7 +102,7 @@
},
{
"type": "VEndTag",
- "text": " ",
+ "text": " ",
"children": []
}
]
diff --git a/test/fixtures/ast/hole-in-array/ast.json b/test/fixtures/ast/hole-in-array/ast.json
index 2c8dfa86..f435432e 100644
--- a/test/fixtures/ast/hole-in-array/ast.json
+++ b/test/fixtures/ast/hole-in-array/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/html-entities-in-static-places/ast.json b/test/fixtures/ast/html-entities-in-static-places/ast.json
index a9c98c69..1959d1b0 100644
--- a/test/fixtures/ast/html-entities-in-static-places/ast.json
+++ b/test/fixtures/ast/html-entities-in-static-places/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/html-entities-lone-amp/ast.json b/test/fixtures/ast/html-entities-lone-amp/ast.json
new file mode 100644
index 00000000..1714f23d
--- /dev/null
+++ b/test/fixtures/ast/html-entities-lone-amp/ast.json
@@ -0,0 +1,1723 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 187
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 15,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 27
+ }
+ },
+ "name": "mycomponent",
+ "rawName": "MyComponent",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 15,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 27
+ }
+ },
+ "selfClosing": true,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 28,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 24
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 28,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "name": "foo",
+ "rawName": "foo"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 32,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 24
+ }
+ },
+ "value": "&"
+ }
+ }
+ ]
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 38,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 27
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 43,
+ 66
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 27
+ }
+ },
+ "name": "mycomponent",
+ "rawName": "MyComponent",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 43,
+ 66
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 27
+ }
+ },
+ "selfClosing": true,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 56,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 24
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 56,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 20
+ }
+ },
+ "name": "foo",
+ "rawName": "foo"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 60,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 24
+ }
+ },
+ "value": "&"
+ }
+ }
+ ]
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 66,
+ 71
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 27
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 71,
+ 92
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 25
+ }
+ },
+ "name": "mycomponent",
+ "rawName": "MyComponent",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 71,
+ 92
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 25
+ }
+ },
+ "selfClosing": true,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 84,
+ 89
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 17
+ },
+ "end": {
+ "line": 4,
+ "column": 22
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 84,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 17
+ },
+ "end": {
+ "line": 4,
+ "column": 20
+ }
+ },
+ "name": "foo",
+ "rawName": "foo"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 88,
+ 89
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 21
+ },
+ "end": {
+ "line": 4,
+ "column": 22
+ }
+ },
+ "value": "&"
+ }
+ }
+ ]
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 92,
+ 97
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 25
+ },
+ "end": {
+ "line": 5,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 97,
+ 122
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 4
+ },
+ "end": {
+ "line": 5,
+ "column": 29
+ }
+ },
+ "name": "mycomponent",
+ "rawName": "MyComponent",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 97,
+ 122
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 4
+ },
+ "end": {
+ "line": 5,
+ "column": 29
+ }
+ },
+ "selfClosing": true,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 110,
+ 115
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 17
+ },
+ "end": {
+ "line": 5,
+ "column": 22
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 110,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 17
+ },
+ "end": {
+ "line": 5,
+ "column": 20
+ }
+ },
+ "name": "foo",
+ "rawName": "foo"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 114,
+ 115
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 21
+ },
+ "end": {
+ "line": 5,
+ "column": 22
+ }
+ },
+ "value": "&"
+ }
+ },
+ {
+ "type": "VAttribute",
+ "range": [
+ 116,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 23
+ },
+ "end": {
+ "line": 5,
+ "column": 26
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 116,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 23
+ },
+ "end": {
+ "line": 5,
+ "column": 26
+ }
+ },
+ "name": "bar",
+ "rawName": "bar"
+ },
+ "value": null
+ }
+ ]
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 122,
+ 127
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 29
+ },
+ "end": {
+ "line": 6,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 127,
+ 169
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 46
+ }
+ },
+ "name": "mycomponent",
+ "rawName": "MyComponent",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 127,
+ 146
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 23
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 140,
+ 145
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 17
+ },
+ "end": {
+ "line": 6,
+ "column": 22
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 140,
+ 143
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 17
+ },
+ "end": {
+ "line": 6,
+ "column": 20
+ }
+ },
+ "name": "foo",
+ "rawName": "foo"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 144,
+ 145
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 21
+ },
+ "end": {
+ "line": 6,
+ "column": 22
+ }
+ },
+ "value": "&"
+ }
+ }
+ ]
+ },
+ "children": [
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 146,
+ 155
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 23
+ },
+ "end": {
+ "line": 6,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 148,
+ "end": 153,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 25
+ },
+ "end": {
+ "line": 6,
+ "column": 30
+ }
+ },
+ "range": [
+ 148,
+ 153
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 148,
+ "end": 149,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 25
+ },
+ "end": {
+ "line": 6,
+ "column": 26
+ }
+ },
+ "range": [
+ 148,
+ 149
+ ],
+ "name": "a"
+ },
+ "operator": "&",
+ "right": {
+ "type": "Identifier",
+ "start": 152,
+ "end": 153,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 29
+ },
+ "end": {
+ "line": 6,
+ "column": 30
+ }
+ },
+ "range": [
+ 152,
+ 153
+ ],
+ "name": "b"
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 148,
+ "end": 149,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 25
+ },
+ "end": {
+ "line": 6,
+ "column": 26
+ }
+ },
+ "range": [
+ 148,
+ 149
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 152,
+ "end": 153,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 29
+ },
+ "end": {
+ "line": 6,
+ "column": 30
+ }
+ },
+ "range": [
+ 152,
+ 153
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 155,
+ 169
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 32
+ },
+ "end": {
+ "line": 6,
+ "column": 46
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 169,
+ 176
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 46
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n &\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 176,
+ 187
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 15,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "value": "mycomponent"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 28,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 31,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 20
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 32,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 24
+ }
+ },
+ "value": "&"
+ },
+ {
+ "type": "HTMLSelfClosingTagClose",
+ "range": [
+ 36,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 25
+ },
+ "end": {
+ "line": 2,
+ "column": 27
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 38,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 27
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 43,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 16
+ }
+ },
+ "value": "mycomponent"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 56,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 20
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 59,
+ 60
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 20
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 60,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 24
+ }
+ },
+ "value": "&"
+ },
+ {
+ "type": "HTMLSelfClosingTagClose",
+ "range": [
+ 64,
+ 66
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 25
+ },
+ "end": {
+ "line": 3,
+ "column": 27
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 66,
+ 71
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 27
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 71,
+ 83
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 16
+ }
+ },
+ "value": "mycomponent"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 84,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 17
+ },
+ "end": {
+ "line": 4,
+ "column": 20
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 87,
+ 88
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 20
+ },
+ "end": {
+ "line": 4,
+ "column": 21
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 88,
+ 89
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 21
+ },
+ "end": {
+ "line": 4,
+ "column": 22
+ }
+ },
+ "value": "&"
+ },
+ {
+ "type": "HTMLSelfClosingTagClose",
+ "range": [
+ 90,
+ 92
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 23
+ },
+ "end": {
+ "line": 4,
+ "column": 25
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 92,
+ 97
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 25
+ },
+ "end": {
+ "line": 5,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 97,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 4
+ },
+ "end": {
+ "line": 5,
+ "column": 16
+ }
+ },
+ "value": "mycomponent"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 110,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 17
+ },
+ "end": {
+ "line": 5,
+ "column": 20
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 113,
+ 114
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 20
+ },
+ "end": {
+ "line": 5,
+ "column": 21
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 114,
+ 115
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 21
+ },
+ "end": {
+ "line": 5,
+ "column": 22
+ }
+ },
+ "value": "&"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 116,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 23
+ },
+ "end": {
+ "line": 5,
+ "column": 26
+ }
+ },
+ "value": "bar"
+ },
+ {
+ "type": "HTMLSelfClosingTagClose",
+ "range": [
+ 120,
+ 122
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 27
+ },
+ "end": {
+ "line": 5,
+ "column": 29
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 122,
+ 127
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 29
+ },
+ "end": {
+ "line": 6,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 127,
+ 139
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 16
+ }
+ },
+ "value": "mycomponent"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 140,
+ 143
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 17
+ },
+ "end": {
+ "line": 6,
+ "column": 20
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 143,
+ 144
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 20
+ },
+ "end": {
+ "line": 6,
+ "column": 21
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 144,
+ 145
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 21
+ },
+ "end": {
+ "line": 6,
+ "column": 22
+ }
+ },
+ "value": "&"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 145,
+ 146
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 22
+ },
+ "end": {
+ "line": 6,
+ "column": 23
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 146,
+ 148
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 23
+ },
+ "end": {
+ "line": 6,
+ "column": 25
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 148,
+ "end": 149,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 25
+ },
+ "end": {
+ "line": 6,
+ "column": 26
+ }
+ },
+ "range": [
+ 148,
+ 149
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "&",
+ "start": 150,
+ "end": 151,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 27
+ },
+ "end": {
+ "line": 6,
+ "column": 28
+ }
+ },
+ "range": [
+ 150,
+ 151
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 152,
+ "end": 153,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 29
+ },
+ "end": {
+ "line": 6,
+ "column": 30
+ }
+ },
+ "range": [
+ 152,
+ 153
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 153,
+ 155
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 30
+ },
+ "end": {
+ "line": 6,
+ "column": 32
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 155,
+ 168
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 32
+ },
+ "end": {
+ "line": 6,
+ "column": 45
+ }
+ },
+ "value": "mycomponent"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 168,
+ 169
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 45
+ },
+ "end": {
+ "line": 6,
+ "column": 46
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 169,
+ 174
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 46
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 174,
+ 175
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 5
+ }
+ },
+ "value": "&"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 175,
+ 176
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 5
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 176,
+ 186
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 186,
+ 187
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 187,
+ 188
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 11
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": [
+ {
+ "message": "non-void-html-element-start-tag-with-trailing-solidus",
+ "index": 15,
+ "lineNumber": 2,
+ "column": 4
+ },
+ {
+ "message": "non-void-html-element-start-tag-with-trailing-solidus",
+ "index": 43,
+ "lineNumber": 3,
+ "column": 4
+ },
+ {
+ "message": "non-void-html-element-start-tag-with-trailing-solidus",
+ "index": 71,
+ "lineNumber": 4,
+ "column": 4
+ },
+ {
+ "message": "non-void-html-element-start-tag-with-trailing-solidus",
+ "index": 97,
+ "lineNumber": 5,
+ "column": 4
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/html-entities-lone-amp/source.vue b/test/fixtures/ast/html-entities-lone-amp/source.vue
new file mode 100644
index 00000000..b6bac9ef
--- /dev/null
+++ b/test/fixtures/ast/html-entities-lone-amp/source.vue
@@ -0,0 +1,8 @@
+
+
+
+
+
+ {{a & b}}
+ &
+
diff --git a/test/fixtures/ast/html-entities-lone-amp/token-ranges.json b/test/fixtures/ast/html-entities-lone-amp/token-ranges.json
new file mode 100644
index 00000000..0f15d840
--- /dev/null
+++ b/test/fixtures/ast/html-entities-lone-amp/token-ranges.json
@@ -0,0 +1,48 @@
+[
+ "
",
+ "\n ",
+ " ",
+ "\n ",
+ " ",
+ "\n ",
+ " ",
+ "\n ",
+ " ",
+ "\n ",
+ "",
+ "{{",
+ "a",
+ "&",
+ "b",
+ "}}",
+ " ",
+ "\n ",
+ "&",
+ "\n",
+ " ",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/html-entities-lone-amp/tree.json b/test/fixtures/ast/html-entities-lone-amp/tree.json
new file mode 100644
index 00000000..68c8ede7
--- /dev/null
+++ b/test/fixtures/ast/html-entities-lone-amp/tree.json
@@ -0,0 +1,226 @@
+[
+ {
+ "type": "VElement",
+ "text": "
\n \n \n \n \n {{a & b}} \n &\n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "foo=\"&\"",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "foo",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "\"&\"",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "foo='&'",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "foo",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "'&'",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "foo=&",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "foo",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "&",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "foo=&",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "foo",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "&",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VAttribute",
+ "text": "bar",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "bar",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "{{a & b}} ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "foo=&",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "foo",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "&",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{a & b}}",
+ "children": [
+ {
+ "type": "BinaryExpression",
+ "text": "a & b",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "a",
+ "children": []
+ },
+ {
+ "type": "Identifier",
+ "text": "b",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n &\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/html-entities-mapping/ast.json b/test/fixtures/ast/html-entities-mapping/ast.json
index a4214137..69aab3f9 100644
--- a/test/fixtures/ast/html-entities-mapping/ast.json
+++ b/test/fixtures/ast/html-entities-mapping/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/html-entities-numeric/ast.json b/test/fixtures/ast/html-entities-numeric/ast.json
index 4c5e77c8..0480cae5 100644
--- a/test/fixtures/ast/html-entities-numeric/ast.json
+++ b/test/fixtures/ast/html-entities-numeric/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/html-entities-special-in-attributes/ast.json b/test/fixtures/ast/html-entities-special-in-attributes/ast.json
index ef52f027..23c8c433 100644
--- a/test/fixtures/ast/html-entities-special-in-attributes/ast.json
+++ b/test/fixtures/ast/html-entities-special-in-attributes/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/html-entities-surrogate-pair-and-expression/ast.json b/test/fixtures/ast/html-entities-surrogate-pair-and-expression/ast.json
index 3cf43b01..a499ff27 100644
--- a/test/fixtures/ast/html-entities-surrogate-pair-and-expression/ast.json
+++ b/test/fixtures/ast/html-entities-surrogate-pair-and-expression/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/html-entities-with-line-terminators/ast.json b/test/fixtures/ast/html-entities-with-line-terminators/ast.json
index ff6d2941..18b3e947 100644
--- a/test/fixtures/ast/html-entities-with-line-terminators/ast.json
+++ b/test/fixtures/ast/html-entities-with-line-terminators/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/html-entities/ast.json b/test/fixtures/ast/html-entities/ast.json
index 0d9c4201..98faf0df 100644
--- a/test/fixtures/ast/html-entities/ast.json
+++ b/test/fixtures/ast/html-entities/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/input-component/ast.json b/test/fixtures/ast/input-component/ast.json
new file mode 100644
index 00000000..0e782a38
--- /dev/null
+++ b/test/fixtures/ast/input-component/ast.json
@@ -0,0 +1,1246 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 141
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 13
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 13,
+ 129
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "name": "div",
+ "rawName": "div",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 13,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 18,
+ 23
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 23,
+ 120
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "name": "input",
+ "rawName": "Input",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 23,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 30,
+ 37
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 4,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 37,
+ 107
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 17
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 37,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 24
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 47,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 16
+ },
+ "end": {
+ "line": 4,
+ "column": 23
+ }
+ },
+ "directive": true,
+ "key": {
+ "type": "VDirectiveKey",
+ "range": [
+ 47,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 16
+ },
+ "end": {
+ "line": 4,
+ "column": 23
+ }
+ },
+ "name": {
+ "type": "VIdentifier",
+ "range": [
+ 47,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "column": 16,
+ "line": 4
+ },
+ "end": {
+ "column": 17,
+ "line": 4
+ }
+ },
+ "name": "slot",
+ "rawName": "#"
+ },
+ "argument": {
+ "type": "VIdentifier",
+ "range": [
+ 48,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "column": 17,
+ "line": 4
+ },
+ "end": {
+ "column": 23,
+ "line": 4
+ }
+ },
+ "name": "suffix",
+ "rawName": "suffix"
+ },
+ "modifiers": []
+ },
+ "value": null
+ }
+ ]
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 55,
+ 64
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 24
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 64,
+ 89
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 33
+ }
+ },
+ "name": "icon",
+ "rawName": "Icon",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 64,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 26
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 70,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 14
+ },
+ "end": {
+ "line": 5,
+ "column": 25
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 70,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 14
+ },
+ "end": {
+ "line": 5,
+ "column": 18
+ }
+ },
+ "name": "name",
+ "rawName": "name"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 75,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 25
+ }
+ },
+ "value": "user"
+ }
+ }
+ ]
+ },
+ "children": [],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 82,
+ 89
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 26
+ },
+ "end": {
+ "line": 5,
+ "column": 33
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 89,
+ 96
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 33
+ },
+ "end": {
+ "line": 6,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 96,
+ 107
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 17
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 107,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 17
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 112,
+ 120
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 120,
+ 123
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 123,
+ 129
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 2
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 129,
+ 130
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 130,
+ 141
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 13
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 13,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "div"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 17,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 18,
+ 23
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 23,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "input"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 29,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 30,
+ 37
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 4,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 37,
+ 46
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 15
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 47,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "column": 16,
+ "line": 4
+ },
+ "end": {
+ "column": 17,
+ "line": 4
+ }
+ },
+ "value": "#"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 48,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "column": 17,
+ "line": 4
+ },
+ "end": {
+ "column": 23,
+ "line": 4
+ }
+ },
+ "value": "suffix"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 54,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 23
+ },
+ "end": {
+ "line": 4,
+ "column": 24
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 55,
+ 64
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 24
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 64,
+ 69
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 13
+ }
+ },
+ "value": "icon"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 70,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 14
+ },
+ "end": {
+ "line": 5,
+ "column": 18
+ }
+ },
+ "value": "name"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 74,
+ 75
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 19
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 75,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 25
+ }
+ },
+ "value": "user"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 81,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 25
+ },
+ "end": {
+ "line": 5,
+ "column": 26
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 82,
+ 88
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 26
+ },
+ "end": {
+ "line": 5,
+ "column": 32
+ }
+ },
+ "value": "icon"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 88,
+ 89
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 32
+ },
+ "end": {
+ "line": 5,
+ "column": 33
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 89,
+ 96
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 33
+ },
+ "end": {
+ "line": 6,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 96,
+ 106
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 16
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 106,
+ 107
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 16
+ },
+ "end": {
+ "line": 6,
+ "column": 17
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 107,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 17
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 112,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 11
+ }
+ },
+ "value": "input"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 119,
+ 120
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 11
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 120,
+ 123
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 123,
+ 128
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 2
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": "div"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 128,
+ 129
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 129,
+ 130
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 130,
+ 140
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 140,
+ 141
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 10
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 141,
+ 142
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 210,
+ 211
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 68
+ },
+ "end": {
+ "line": 11,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [
+ {
+ "type": "HTMLComment",
+ "range": [
+ 142,
+ 210
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 68
+ }
+ },
+ "value": " from https://github.com/vuejs/eslint-plugin-vue/issues/1292 "
+ }
+ ],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/input-component/source.vue b/test/fixtures/ast/input-component/source.vue
new file mode 100644
index 00000000..be80913a
--- /dev/null
+++ b/test/fixtures/ast/input-component/source.vue
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/ast/input-component/token-ranges.json b/test/fixtures/ast/input-component/token-ranges.json
new file mode 100644
index 00000000..72ecce42
--- /dev/null
+++ b/test/fixtures/ast/input-component/token-ranges.json
@@ -0,0 +1,38 @@
+[
+ "
",
+ "\n ",
+ "",
+ "\n ",
+ " ",
+ "\n ",
+ "",
+ "\n ",
+ "",
+ " ",
+ "\n ",
+ " ",
+ "\n ",
+ "",
+ "\n ",
+ "
",
+ "\n",
+ " ",
+ "\n",
+ "\n",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/input-component/tree.json b/test/fixtures/ast/input-component/tree.json
new file mode 100644
index 00000000..859c2908
--- /dev/null
+++ b/test/fixtures/ast/input-component/tree.json
@@ -0,0 +1,162 @@
+[
+ {
+ "type": "VElement",
+ "text": "
\n \n \n \n \n \n \n
\n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "\n \n \n \n \n \n
",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " \n \n \n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "\n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "#suffix",
+ "children": [
+ {
+ "type": "VDirectiveKey",
+ "text": "#suffix",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "#",
+ "children": []
+ },
+ {
+ "type": "VIdentifier",
+ "text": "suffix",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "name=\"user\"",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "name",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "\"user\"",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": "
",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/link-component/ast.json b/test/fixtures/ast/link-component/ast.json
new file mode 100644
index 00000000..a0ea7e45
--- /dev/null
+++ b/test/fixtures/ast/link-component/ast.json
@@ -0,0 +1,2582 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 277
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 13
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 13,
+ 265
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "name": "link",
+ "rawName": "Link",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 13,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 43
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 19,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "directive": true,
+ "key": {
+ "type": "VDirectiveKey",
+ "range": [
+ 19,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "name": {
+ "type": "VIdentifier",
+ "range": [
+ 19,
+ 20
+ ],
+ "loc": {
+ "start": {
+ "column": 8,
+ "line": 2
+ },
+ "end": {
+ "column": 9,
+ "line": 2
+ }
+ },
+ "name": "bind",
+ "rawName": ":"
+ },
+ "argument": {
+ "type": "VIdentifier",
+ "range": [
+ 20,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "column": 9,
+ "line": 2
+ },
+ "end": {
+ "column": 11,
+ "line": 2
+ }
+ },
+ "name": "to",
+ "rawName": "to"
+ },
+ "modifiers": []
+ },
+ "value": {
+ "type": "VExpressionContainer",
+ "range": [
+ 23,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "range": [
+ 24,
+ 26
+ ],
+ "name": "to"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "range": [
+ 24,
+ 26
+ ],
+ "name": "to"
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ },
+ {
+ "type": "VAttribute",
+ "range": [
+ 28,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 42
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 28,
+ 33
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "name": "class",
+ "rawName": "class"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 34,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 23
+ },
+ "end": {
+ "line": 2,
+ "column": 42
+ }
+ },
+ "value": "flex items-center"
+ }
+ }
+ ]
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 54,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 43
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 59,
+ 242
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 11
+ }
+ },
+ "name": "span",
+ "rawName": "span",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 59,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 58
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 65,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 44
+ }
+ },
+ "directive": true,
+ "key": {
+ "type": "VDirectiveKey",
+ "range": [
+ 65,
+ 69
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 14
+ }
+ },
+ "name": {
+ "type": "VIdentifier",
+ "range": [
+ 65,
+ 69
+ ],
+ "loc": {
+ "start": {
+ "column": 10,
+ "line": 3
+ },
+ "end": {
+ "column": 14,
+ "line": 3
+ }
+ },
+ "name": "if",
+ "rawName": "if"
+ },
+ "argument": null,
+ "modifiers": []
+ },
+ "value": {
+ "type": "VExpressionContainer",
+ "range": [
+ 70,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 3,
+ "column": 44
+ }
+ },
+ "expression": {
+ "type": "LogicalExpression",
+ "start": 71,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 16
+ },
+ "end": {
+ "line": 3,
+ "column": 43
+ }
+ },
+ "range": [
+ 71,
+ 98
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 71,
+ "end": 81,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 16
+ },
+ "end": {
+ "line": 3,
+ "column": 26
+ }
+ },
+ "range": [
+ 71,
+ 81
+ ],
+ "name": "prefixIcon"
+ },
+ "operator": "||",
+ "right": {
+ "type": "MemberExpression",
+ "start": 85,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 30
+ },
+ "end": {
+ "line": 3,
+ "column": 43
+ }
+ },
+ "range": [
+ 85,
+ 98
+ ],
+ "object": {
+ "type": "Identifier",
+ "start": 85,
+ "end": 91,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 30
+ },
+ "end": {
+ "line": 3,
+ "column": 36
+ }
+ },
+ "range": [
+ 85,
+ 91
+ ],
+ "name": "$slots"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 92,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 37
+ },
+ "end": {
+ "line": 3,
+ "column": 43
+ }
+ },
+ "range": [
+ 92,
+ 98
+ ],
+ "name": "prefix"
+ },
+ "computed": false,
+ "optional": false
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 71,
+ "end": 81,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 16
+ },
+ "end": {
+ "line": 3,
+ "column": 26
+ }
+ },
+ "range": [
+ 71,
+ 81
+ ],
+ "name": "prefixIcon"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 85,
+ "end": 91,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 30
+ },
+ "end": {
+ "line": 3,
+ "column": 36
+ }
+ },
+ "range": [
+ 85,
+ 91
+ ],
+ "name": "$slots"
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ },
+ {
+ "type": "VAttribute",
+ "range": [
+ 100,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 45
+ },
+ "end": {
+ "line": 3,
+ "column": 57
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 100,
+ 105
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 45
+ },
+ "end": {
+ "line": 3,
+ "column": 50
+ }
+ },
+ "name": "class",
+ "rawName": "class"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 106,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 51
+ },
+ "end": {
+ "line": 3,
+ "column": 57
+ }
+ },
+ "value": "mr-1"
+ }
+ }
+ ]
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 113,
+ 120
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 58
+ },
+ "end": {
+ "line": 4,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 120,
+ 230
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 13
+ }
+ },
+ "name": "slot",
+ "rawName": "slot",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 120,
+ 140
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 26
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 126,
+ 139
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 12
+ },
+ "end": {
+ "line": 4,
+ "column": 25
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 126,
+ 130
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 12
+ },
+ "end": {
+ "line": 4,
+ "column": 16
+ }
+ },
+ "name": "name",
+ "rawName": "name"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 131,
+ 139
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 17
+ },
+ "end": {
+ "line": 4,
+ "column": 25
+ }
+ },
+ "value": "prefix"
+ }
+ }
+ ]
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 140,
+ 149
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 26
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 149,
+ 216
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 75
+ }
+ },
+ "name": "fontawesomeicon",
+ "rawName": "FontAwesomeIcon",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 149,
+ 216
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 75
+ }
+ },
+ "selfClosing": true,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 166,
+ 183
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 25
+ },
+ "end": {
+ "line": 5,
+ "column": 42
+ }
+ },
+ "directive": true,
+ "key": {
+ "type": "VDirectiveKey",
+ "range": [
+ 166,
+ 170
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 25
+ },
+ "end": {
+ "line": 5,
+ "column": 29
+ }
+ },
+ "name": {
+ "type": "VIdentifier",
+ "range": [
+ 166,
+ 170
+ ],
+ "loc": {
+ "start": {
+ "column": 25,
+ "line": 5
+ },
+ "end": {
+ "column": 29,
+ "line": 5
+ }
+ },
+ "name": "if",
+ "rawName": "if"
+ },
+ "argument": null,
+ "modifiers": []
+ },
+ "value": {
+ "type": "VExpressionContainer",
+ "range": [
+ 171,
+ 183
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 30
+ },
+ "end": {
+ "line": 5,
+ "column": 42
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 172,
+ "end": 182,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 31
+ },
+ "end": {
+ "line": 5,
+ "column": 41
+ }
+ },
+ "range": [
+ 172,
+ 182
+ ],
+ "name": "prefixIcon"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 172,
+ "end": 182,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 31
+ },
+ "end": {
+ "line": 5,
+ "column": 41
+ }
+ },
+ "range": [
+ 172,
+ 182
+ ],
+ "name": "prefixIcon"
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ },
+ {
+ "type": "VAttribute",
+ "range": [
+ 184,
+ 202
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 43
+ },
+ "end": {
+ "line": 5,
+ "column": 61
+ }
+ },
+ "directive": true,
+ "key": {
+ "type": "VDirectiveKey",
+ "range": [
+ 184,
+ 189
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 43
+ },
+ "end": {
+ "line": 5,
+ "column": 48
+ }
+ },
+ "name": {
+ "type": "VIdentifier",
+ "range": [
+ 184,
+ 185
+ ],
+ "loc": {
+ "start": {
+ "column": 43,
+ "line": 5
+ },
+ "end": {
+ "column": 44,
+ "line": 5
+ }
+ },
+ "name": "bind",
+ "rawName": ":"
+ },
+ "argument": {
+ "type": "VIdentifier",
+ "range": [
+ 185,
+ 189
+ ],
+ "loc": {
+ "start": {
+ "column": 44,
+ "line": 5
+ },
+ "end": {
+ "column": 48,
+ "line": 5
+ }
+ },
+ "name": "icon",
+ "rawName": "icon"
+ },
+ "modifiers": []
+ },
+ "value": {
+ "type": "VExpressionContainer",
+ "range": [
+ 190,
+ 202
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 49
+ },
+ "end": {
+ "line": 5,
+ "column": 61
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 191,
+ "end": 201,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 50
+ },
+ "end": {
+ "line": 5,
+ "column": 60
+ }
+ },
+ "range": [
+ 191,
+ 201
+ ],
+ "name": "prefixIcon"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 191,
+ "end": 201,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 50
+ },
+ "end": {
+ "line": 5,
+ "column": 60
+ }
+ },
+ "range": [
+ 191,
+ 201
+ ],
+ "name": "prefixIcon"
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ },
+ {
+ "type": "VAttribute",
+ "range": [
+ 203,
+ 213
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 62
+ },
+ "end": {
+ "line": 5,
+ "column": 72
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 203,
+ 213
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 62
+ },
+ "end": {
+ "line": 5,
+ "column": 72
+ }
+ },
+ "name": "fixedwidth",
+ "rawName": "fixedWidth"
+ },
+ "value": null
+ }
+ ]
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 216,
+ 223
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 75
+ },
+ "end": {
+ "line": 6,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 223,
+ 230
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 13
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 230,
+ 235
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 235,
+ 242
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 11
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 242,
+ 247
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 11
+ },
+ "end": {
+ "line": 8,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 247,
+ 255
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 4
+ },
+ "end": {
+ "line": 8,
+ "column": 12
+ }
+ },
+ "name": "slot",
+ "rawName": "slot",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 247,
+ 255
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 4
+ },
+ "end": {
+ "line": 8,
+ "column": 12
+ }
+ },
+ "selfClosing": true,
+ "attributes": []
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 255,
+ 258
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 258,
+ 265
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 2
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 265,
+ 266
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 266,
+ 277
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 13
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 13,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": "link"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 19,
+ 20
+ ],
+ "loc": {
+ "start": {
+ "column": 8,
+ "line": 2
+ },
+ "end": {
+ "column": 9,
+ "line": 2
+ }
+ },
+ "value": ":"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 20,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "column": 9,
+ "line": 2
+ },
+ "end": {
+ "column": 11,
+ "line": 2
+ }
+ },
+ "value": "to"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 22,
+ 23
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 23,
+ 24
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "Identifier",
+ "value": "to",
+ "start": 24,
+ "end": 26,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 15
+ }
+ },
+ "range": [
+ 24,
+ 26
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 28,
+ 33
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "value": "class"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 33,
+ 34
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 22
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 34,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 23
+ },
+ "end": {
+ "line": 2,
+ "column": 42
+ }
+ },
+ "value": "flex items-center"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 53,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 42
+ },
+ "end": {
+ "line": 2,
+ "column": 43
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 54,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 43
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 59,
+ 64
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "value": "span"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 65,
+ 69
+ ],
+ "loc": {
+ "start": {
+ "column": 10,
+ "line": 3
+ },
+ "end": {
+ "column": 14,
+ "line": 3
+ }
+ },
+ "value": "v-if"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 69,
+ 70
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 14
+ },
+ "end": {
+ "line": 3,
+ "column": 15
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 70,
+ 71
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 3,
+ "column": 16
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "Identifier",
+ "value": "prefixIcon",
+ "start": 71,
+ "end": 81,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 16
+ },
+ "end": {
+ "line": 3,
+ "column": 26
+ }
+ },
+ "range": [
+ 71,
+ 81
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "||",
+ "start": 82,
+ "end": 84,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 27
+ },
+ "end": {
+ "line": 3,
+ "column": 29
+ }
+ },
+ "range": [
+ 82,
+ 84
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "$slots",
+ "start": 85,
+ "end": 91,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 30
+ },
+ "end": {
+ "line": 3,
+ "column": 36
+ }
+ },
+ "range": [
+ 85,
+ 91
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ".",
+ "start": 91,
+ "end": 92,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 36
+ },
+ "end": {
+ "line": 3,
+ "column": 37
+ }
+ },
+ "range": [
+ 91,
+ 92
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "prefix",
+ "start": 92,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 37
+ },
+ "end": {
+ "line": 3,
+ "column": 43
+ }
+ },
+ "range": [
+ 92,
+ 98
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 98,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 43
+ },
+ "end": {
+ "line": 3,
+ "column": 44
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 100,
+ 105
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 45
+ },
+ "end": {
+ "line": 3,
+ "column": 50
+ }
+ },
+ "value": "class"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 105,
+ 106
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 50
+ },
+ "end": {
+ "line": 3,
+ "column": 51
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 106,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 51
+ },
+ "end": {
+ "line": 3,
+ "column": 57
+ }
+ },
+ "value": "mr-1"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 112,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 57
+ },
+ "end": {
+ "line": 3,
+ "column": 58
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 113,
+ 120
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 58
+ },
+ "end": {
+ "line": 4,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 120,
+ 125
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 11
+ }
+ },
+ "value": "slot"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 126,
+ 130
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 12
+ },
+ "end": {
+ "line": 4,
+ "column": 16
+ }
+ },
+ "value": "name"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 130,
+ 131
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 16
+ },
+ "end": {
+ "line": 4,
+ "column": 17
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 131,
+ 139
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 17
+ },
+ "end": {
+ "line": 4,
+ "column": 25
+ }
+ },
+ "value": "prefix"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 139,
+ 140
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 25
+ },
+ "end": {
+ "line": 4,
+ "column": 26
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 140,
+ 149
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 26
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 149,
+ 165
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 24
+ }
+ },
+ "value": "fontawesomeicon"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 166,
+ 170
+ ],
+ "loc": {
+ "start": {
+ "column": 25,
+ "line": 5
+ },
+ "end": {
+ "column": 29,
+ "line": 5
+ }
+ },
+ "value": "v-if"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 170,
+ 171
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 29
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 171,
+ 172
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 30
+ },
+ "end": {
+ "line": 5,
+ "column": 31
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "Identifier",
+ "value": "prefixIcon",
+ "start": 172,
+ "end": 182,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 31
+ },
+ "end": {
+ "line": 5,
+ "column": 41
+ }
+ },
+ "range": [
+ 172,
+ 182
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 182,
+ 183
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 41
+ },
+ "end": {
+ "line": 5,
+ "column": 42
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 184,
+ 185
+ ],
+ "loc": {
+ "start": {
+ "column": 43,
+ "line": 5
+ },
+ "end": {
+ "column": 44,
+ "line": 5
+ }
+ },
+ "value": ":"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 185,
+ 189
+ ],
+ "loc": {
+ "start": {
+ "column": 44,
+ "line": 5
+ },
+ "end": {
+ "column": 48,
+ "line": 5
+ }
+ },
+ "value": "icon"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 189,
+ 190
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 48
+ },
+ "end": {
+ "line": 5,
+ "column": 49
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 190,
+ 191
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 49
+ },
+ "end": {
+ "line": 5,
+ "column": 50
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "Identifier",
+ "value": "prefixIcon",
+ "start": 191,
+ "end": 201,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 50
+ },
+ "end": {
+ "line": 5,
+ "column": 60
+ }
+ },
+ "range": [
+ 191,
+ 201
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 201,
+ 202
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 60
+ },
+ "end": {
+ "line": 5,
+ "column": 61
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 203,
+ 213
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 62
+ },
+ "end": {
+ "line": 5,
+ "column": 72
+ }
+ },
+ "value": "fixedwidth"
+ },
+ {
+ "type": "HTMLSelfClosingTagClose",
+ "range": [
+ 214,
+ 216
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 73
+ },
+ "end": {
+ "line": 5,
+ "column": 75
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 216,
+ 223
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 75
+ },
+ "end": {
+ "line": 6,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 223,
+ 229
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 12
+ }
+ },
+ "value": "slot"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 229,
+ 230
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 12
+ },
+ "end": {
+ "line": 6,
+ "column": 13
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 230,
+ 235
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 235,
+ 241
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 10
+ }
+ },
+ "value": "span"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 241,
+ 242
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 242,
+ 247
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 11
+ },
+ "end": {
+ "line": 8,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 247,
+ 252
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 4
+ },
+ "end": {
+ "line": 8,
+ "column": 9
+ }
+ },
+ "value": "slot"
+ },
+ {
+ "type": "HTMLSelfClosingTagClose",
+ "range": [
+ 253,
+ 255
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 12
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 255,
+ 258
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 258,
+ 264
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 2
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": "link"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 264,
+ 265
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 265,
+ 266
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 266,
+ 276
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 276,
+ 277
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 10
+ },
+ "end": {
+ "line": 10,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 277,
+ 278
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 11
+ },
+ "end": {
+ "line": 11,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 346,
+ 347
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 68
+ },
+ "end": {
+ "line": 12,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [
+ {
+ "type": "HTMLComment",
+ "range": [
+ 278,
+ 346
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 0
+ },
+ "end": {
+ "line": 11,
+ "column": 68
+ }
+ },
+ "value": " from https://github.com/vuejs/eslint-plugin-vue/issues/1439 "
+ }
+ ],
+ "errors": [
+ {
+ "message": "non-void-html-element-start-tag-with-trailing-solidus",
+ "index": 149,
+ "lineNumber": 5,
+ "column": 8
+ },
+ {
+ "message": "non-void-html-element-start-tag-with-trailing-solidus",
+ "index": 247,
+ "lineNumber": 8,
+ "column": 4
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/link-component/source.vue b/test/fixtures/ast/link-component/source.vue
new file mode 100644
index 00000000..5f81ad87
--- /dev/null
+++ b/test/fixtures/ast/link-component/source.vue
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/fixtures/ast/link-component/token-ranges.json b/test/fixtures/ast/link-component/token-ranges.json
new file mode 100644
index 00000000..4a579f82
--- /dev/null
+++ b/test/fixtures/ast/link-component/token-ranges.json
@@ -0,0 +1,70 @@
+[
+ "
",
+ "\n ",
+ " ",
+ "\n ",
+ "",
+ "\n ",
+ "",
+ "\n ",
+ " ",
+ "\n ",
+ " ",
+ "\n ",
+ " ",
+ "\n ",
+ " ",
+ "\n ",
+ "",
+ "\n",
+ " ",
+ "\n",
+ "\n",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/link-component/tree.json b/test/fixtures/ast/link-component/tree.json
new file mode 100644
index 00000000..640c4961
--- /dev/null
+++ b/test/fixtures/ast/link-component/tree.json
@@ -0,0 +1,340 @@
+[
+ {
+ "type": "VElement",
+ "text": "
\n \n \n \n \n \n \n \n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " \n \n \n \n \n \n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": ":to=\"to\"",
+ "children": [
+ {
+ "type": "VDirectiveKey",
+ "text": ":to",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": ":",
+ "children": []
+ },
+ {
+ "type": "VIdentifier",
+ "text": "to",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "\"to\"",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "to",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VAttribute",
+ "text": "class=\"flex items-center\"",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "class",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "\"flex items-center\"",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "\n \n \n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "v-if=\"prefixIcon || $slots.prefix\"",
+ "children": [
+ {
+ "type": "VDirectiveKey",
+ "text": "v-if",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "v-if",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "\"prefixIcon || $slots.prefix\"",
+ "children": [
+ {
+ "type": "LogicalExpression",
+ "text": "prefixIcon || $slots.prefix",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "prefixIcon",
+ "children": []
+ },
+ {
+ "type": "MemberExpression",
+ "text": "$slots.prefix",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "$slots",
+ "children": []
+ },
+ {
+ "type": "Identifier",
+ "text": "prefix",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VAttribute",
+ "text": "class=\"mr-1\"",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "class",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "\"mr-1\"",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "\n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "name=\"prefix\"",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "name",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "\"prefix\"",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "v-if=\"prefixIcon\"",
+ "children": [
+ {
+ "type": "VDirectiveKey",
+ "text": "v-if",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "v-if",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "\"prefixIcon\"",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "prefixIcon",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VAttribute",
+ "text": ":icon=\"prefixIcon\"",
+ "children": [
+ {
+ "type": "VDirectiveKey",
+ "text": ":icon",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": ":",
+ "children": []
+ },
+ {
+ "type": "VIdentifier",
+ "text": "icon",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "\"prefixIcon\"",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "prefixIcon",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VAttribute",
+ "text": "fixedWidth",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "fixedWidth",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/math/ast.json b/test/fixtures/ast/math/ast.json
index dacb9357..eaac83cf 100644
--- a/test/fixtures/ast/math/ast.json
+++ b/test/fixtures/ast/math/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/multiple-scripts-10/ast.json b/test/fixtures/ast/multiple-scripts-10/ast.json
new file mode 100644
index 00000000..dcf27584
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-10/ast.json
@@ -0,0 +1,259 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 9,
+ 22
+ ],
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 9,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 9,
+ 22
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 13,
+ 22
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 13,
+ 18
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 21,
+ 22
+ ],
+ "value": 0,
+ "raw": "0"
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 34,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-10/parser-options.json b/test/fixtures/ast/multiple-scripts-10/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-10/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-10/requirements.json b/test/fixtures/ast/multiple-scripts-10/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-10/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-10/source.vue b/test/fixtures/ast/multiple-scripts-10/source.vue
new file mode 100644
index 00000000..9765b0b9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-10/source.vue
@@ -0,0 +1,5 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-10/token-ranges.json b/test/fixtures/ast/multiple-scripts-10/token-ranges.json
new file mode 100644
index 00000000..0ede0b05
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-10/token-ranges.json
@@ -0,0 +1,10 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-10/tree.json b/test/fixtures/ast/multiple-scripts-10/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-10/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-11/ast.json b/test/fixtures/ast/multiple-scripts-11/ast.json
new file mode 100644
index 00000000..0e4de961
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-11/ast.json
@@ -0,0 +1,3340 @@
+{
+ "type": "Program",
+ "start": 152,
+ "end": 383,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 1
+ }
+ },
+ "range": [
+ 153,
+ 382
+ ],
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 153,
+ "end": 188,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 35
+ }
+ },
+ "range": [
+ 153,
+ 188
+ ],
+ "specifiers": [
+ {
+ "type": "ImportSpecifier",
+ "start": 162,
+ "end": 165,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "range": [
+ 162,
+ 165
+ ],
+ "imported": {
+ "type": "Identifier",
+ "start": 162,
+ "end": 165,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "range": [
+ 162,
+ 165
+ ],
+ "name": "ref"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 162,
+ "end": 165,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "range": [
+ 162,
+ 165
+ ],
+ "name": "ref"
+ }
+ },
+ {
+ "type": "ImportSpecifier",
+ "start": 167,
+ "end": 175,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ },
+ "range": [
+ 167,
+ 175
+ ],
+ "imported": {
+ "type": "Identifier",
+ "start": 167,
+ "end": 175,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ },
+ "range": [
+ 167,
+ 175
+ ],
+ "name": "computed"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 167,
+ "end": 175,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ },
+ "range": [
+ 167,
+ 175
+ ],
+ "name": "computed"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 183,
+ "end": 188,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 30
+ },
+ "end": {
+ "line": 7,
+ "column": 35
+ }
+ },
+ "range": [
+ 183,
+ 188
+ ],
+ "value": "vue",
+ "raw": "'vue'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 250,
+ "end": 281,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 31
+ }
+ },
+ "range": [
+ 250,
+ 281
+ ],
+ "specifiers": [
+ {
+ "type": "ImportSpecifier",
+ "start": 259,
+ "end": 267,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 9
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "range": [
+ 259,
+ 267
+ ],
+ "imported": {
+ "type": "Identifier",
+ "start": 259,
+ "end": 267,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 9
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "range": [
+ 259,
+ 267
+ ],
+ "name": "useStore"
+ },
+ "local": {
+ "type": "Identifier",
+ "start": 259,
+ "end": 267,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 9
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "range": [
+ 259,
+ 267
+ ],
+ "name": "useStore"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 275,
+ "end": 281,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 25
+ },
+ "end": {
+ "line": 8,
+ "column": 31
+ }
+ },
+ "range": [
+ 275,
+ 281
+ ],
+ "value": "vuex",
+ "raw": "'vuex'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 328,
+ "end": 382,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 1
+ }
+ },
+ "range": [
+ 328,
+ 382
+ ],
+ "declaration": {
+ "type": "ObjectExpression",
+ "start": 343,
+ "end": 382,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 15
+ },
+ "end": {
+ "line": 16,
+ "column": 1
+ }
+ },
+ "range": [
+ 343,
+ 382
+ ],
+ "properties": [
+ {
+ "type": "Property",
+ "start": 347,
+ "end": 358,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 2
+ },
+ "end": {
+ "line": 13,
+ "column": 13
+ }
+ },
+ "range": [
+ 347,
+ 358
+ ],
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 347,
+ "end": 351,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 2
+ },
+ "end": {
+ "line": 13,
+ "column": 6
+ }
+ },
+ "range": [
+ 347,
+ 351
+ ],
+ "name": "name"
+ },
+ "value": {
+ "type": "Literal",
+ "start": 353,
+ "end": 358,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 8
+ },
+ "end": {
+ "line": 13,
+ "column": 13
+ }
+ },
+ "range": [
+ 353,
+ 358
+ ],
+ "value": "App",
+ "raw": "'App'"
+ },
+ "kind": "init"
+ },
+ {
+ "type": "Property",
+ "start": 362,
+ "end": 379,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 2
+ },
+ "end": {
+ "line": 15,
+ "column": 3
+ }
+ },
+ "range": [
+ 362,
+ 379
+ ],
+ "method": false,
+ "shorthand": false,
+ "computed": false,
+ "key": {
+ "type": "Identifier",
+ "start": 362,
+ "end": 372,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 2
+ },
+ "end": {
+ "line": 14,
+ "column": 12
+ }
+ },
+ "range": [
+ 362,
+ 372
+ ],
+ "name": "components"
+ },
+ "value": {
+ "type": "ObjectExpression",
+ "start": 374,
+ "end": 379,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 14
+ },
+ "end": {
+ "line": 15,
+ "column": 3
+ }
+ },
+ "range": [
+ 374,
+ 379
+ ],
+ "properties": []
+ },
+ "kind": "init"
+ }
+ ]
+ }
+ }
+ ],
+ "sourceType": "module",
+ "comments": [
+ {
+ "type": "Line",
+ "value": " each time uncomment error will print. anything from 'vue'",
+ "start": 189,
+ "end": 249,
+ "range": [
+ 189,
+ 249
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 36
+ },
+ "end": {
+ "line": 7,
+ "column": 96
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": " others like this is ok",
+ "start": 282,
+ "end": 307,
+ "range": [
+ 282,
+ 307
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 32
+ },
+ "end": {
+ "line": 8,
+ "column": 57
+ }
+ }
+ }
+ ],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 138,
+ 152
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 319,
+ 327
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 0
+ },
+ "end": {
+ "line": 11,
+ "column": 8
+ }
+ },
+ "value": ""
+ }
+ ],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 64,
+ 137
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 64,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 74,
+ 77
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 77,
+ 125
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 4,
+ "column": 8
+ }
+ },
+ "name": "div",
+ "rawName": "div",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 77,
+ 116
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 3,
+ "column": 41
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 82,
+ 93
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 18
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 82,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 12
+ }
+ },
+ "name": "class",
+ "rawName": "class"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 88,
+ 93
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 18
+ }
+ },
+ "value": "f-c"
+ }
+ },
+ {
+ "type": "VAttribute",
+ "range": [
+ 94,
+ 115
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 19
+ },
+ "end": {
+ "line": 3,
+ "column": 40
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 94,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 19
+ },
+ "end": {
+ "line": 3,
+ "column": 24
+ }
+ },
+ "name": "style",
+ "rawName": "style"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 100,
+ 115
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 25
+ },
+ "end": {
+ "line": 3,
+ "column": 40
+ }
+ },
+ "value": "height: 100%;"
+ }
+ }
+ ]
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 116,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 41
+ },
+ "end": {
+ "line": 4,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 119,
+ 125
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 2
+ },
+ "end": {
+ "line": 4,
+ "column": 8
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 125,
+ 126
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 126,
+ 137
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 63,
+ 64
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 63
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 64,
+ 73
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 73,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 74,
+ 77
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 77,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 3,
+ "column": 6
+ }
+ },
+ "value": "div"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 82,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 12
+ }
+ },
+ "value": "class"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 87,
+ 88
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 88,
+ 93
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 18
+ }
+ },
+ "value": "f-c"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 94,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 19
+ },
+ "end": {
+ "line": 3,
+ "column": 24
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 99,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 24
+ },
+ "end": {
+ "line": 3,
+ "column": 25
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 100,
+ 115
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 25
+ },
+ "end": {
+ "line": 3,
+ "column": 40
+ }
+ },
+ "value": "height: 100%;"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 115,
+ 116
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 40
+ },
+ "end": {
+ "line": 3,
+ "column": 41
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 116,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 41
+ },
+ "end": {
+ "line": 4,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 119,
+ 124
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 2
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "value": "div"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 124,
+ 125
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 7
+ },
+ "end": {
+ "line": 4,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 125,
+ 126
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 126,
+ 136
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 136,
+ 137
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 137,
+ 138
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 11
+ },
+ "end": {
+ "line": 6,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 138,
+ 145
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 146,
+ 151
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 8
+ },
+ "end": {
+ "line": 6,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 151,
+ 152
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 13
+ },
+ "end": {
+ "line": 6,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 152,
+ 153
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 14
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 153,
+ 159
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 159,
+ 160
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 6
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 160,
+ 161
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 7
+ },
+ "end": {
+ "line": 7,
+ "column": 8
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 161,
+ 162
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 162,
+ 166
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "ref,"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 166,
+ 167
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 167,
+ 175
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ },
+ "value": "computed"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 175,
+ 176
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 22
+ },
+ "end": {
+ "line": 7,
+ "column": 23
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 176,
+ 177
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 23
+ },
+ "end": {
+ "line": 7,
+ "column": 24
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 177,
+ 178
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 24
+ },
+ "end": {
+ "line": 7,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 178,
+ 182
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 25
+ },
+ "end": {
+ "line": 7,
+ "column": 29
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 182,
+ 183
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 29
+ },
+ "end": {
+ "line": 7,
+ "column": 30
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 183,
+ 188
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 30
+ },
+ "end": {
+ "line": 7,
+ "column": 35
+ }
+ },
+ "value": "'vue'"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 188,
+ 189
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 35
+ },
+ "end": {
+ "line": 7,
+ "column": 36
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 189,
+ 191
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 36
+ },
+ "end": {
+ "line": 7,
+ "column": 38
+ }
+ },
+ "value": "//"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 191,
+ 192
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 38
+ },
+ "end": {
+ "line": 7,
+ "column": 39
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 192,
+ 196
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 39
+ },
+ "end": {
+ "line": 7,
+ "column": 43
+ }
+ },
+ "value": "each"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 196,
+ 197
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 43
+ },
+ "end": {
+ "line": 7,
+ "column": 44
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 197,
+ 201
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 44
+ },
+ "end": {
+ "line": 7,
+ "column": 48
+ }
+ },
+ "value": "time"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 201,
+ 202
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 48
+ },
+ "end": {
+ "line": 7,
+ "column": 49
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 202,
+ 211
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 49
+ },
+ "end": {
+ "line": 7,
+ "column": 58
+ }
+ },
+ "value": "uncomment"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 211,
+ 212
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 58
+ },
+ "end": {
+ "line": 7,
+ "column": 59
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 212,
+ 217
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 59
+ },
+ "end": {
+ "line": 7,
+ "column": 64
+ }
+ },
+ "value": "error"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 217,
+ 218
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 64
+ },
+ "end": {
+ "line": 7,
+ "column": 65
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 218,
+ 222
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 65
+ },
+ "end": {
+ "line": 7,
+ "column": 69
+ }
+ },
+ "value": "will"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 222,
+ 223
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 69
+ },
+ "end": {
+ "line": 7,
+ "column": 70
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 223,
+ 229
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 70
+ },
+ "end": {
+ "line": 7,
+ "column": 76
+ }
+ },
+ "value": "print."
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 229,
+ 230
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 76
+ },
+ "end": {
+ "line": 7,
+ "column": 77
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 230,
+ 238
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 77
+ },
+ "end": {
+ "line": 7,
+ "column": 85
+ }
+ },
+ "value": "anything"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 238,
+ 239
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 85
+ },
+ "end": {
+ "line": 7,
+ "column": 86
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 239,
+ 243
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 86
+ },
+ "end": {
+ "line": 7,
+ "column": 90
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 243,
+ 244
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 90
+ },
+ "end": {
+ "line": 7,
+ "column": 91
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 244,
+ 249
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 91
+ },
+ "end": {
+ "line": 7,
+ "column": 96
+ }
+ },
+ "value": "'vue'"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 249,
+ 250
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 96
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 250,
+ 256
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 256,
+ 257
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 257,
+ 258
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 258,
+ 259
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 9
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 259,
+ 267
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 9
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "value": "useStore"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 267,
+ 268
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 17
+ },
+ "end": {
+ "line": 8,
+ "column": 18
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 268,
+ 269
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 18
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 269,
+ 270
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 19
+ },
+ "end": {
+ "line": 8,
+ "column": 20
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 270,
+ 274
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 20
+ },
+ "end": {
+ "line": 8,
+ "column": 24
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 274,
+ 275
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 24
+ },
+ "end": {
+ "line": 8,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 275,
+ 281
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 25
+ },
+ "end": {
+ "line": 8,
+ "column": 31
+ }
+ },
+ "value": "'vuex'"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 281,
+ 282
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 31
+ },
+ "end": {
+ "line": 8,
+ "column": 32
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 282,
+ 284
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 32
+ },
+ "end": {
+ "line": 8,
+ "column": 34
+ }
+ },
+ "value": "//"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 284,
+ 285
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 34
+ },
+ "end": {
+ "line": 8,
+ "column": 35
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 285,
+ 291
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 35
+ },
+ "end": {
+ "line": 8,
+ "column": 41
+ }
+ },
+ "value": "others"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 291,
+ 292
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 41
+ },
+ "end": {
+ "line": 8,
+ "column": 42
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 292,
+ 296
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 42
+ },
+ "end": {
+ "line": 8,
+ "column": 46
+ }
+ },
+ "value": "like"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 296,
+ 297
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 46
+ },
+ "end": {
+ "line": 8,
+ "column": 47
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 297,
+ 301
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 47
+ },
+ "end": {
+ "line": 8,
+ "column": 51
+ }
+ },
+ "value": "this"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 301,
+ 302
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 51
+ },
+ "end": {
+ "line": 8,
+ "column": 52
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 302,
+ 304
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 52
+ },
+ "end": {
+ "line": 8,
+ "column": 54
+ }
+ },
+ "value": "is"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 304,
+ 305
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 54
+ },
+ "end": {
+ "line": 8,
+ "column": 55
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 305,
+ 307
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 55
+ },
+ "end": {
+ "line": 8,
+ "column": 57
+ }
+ },
+ "value": "ok"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 307,
+ 308
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 57
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 308,
+ 316
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 316,
+ 317
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 317,
+ 319
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 11,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 319,
+ 326
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 0
+ },
+ "end": {
+ "line": 11,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 326,
+ 327
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 7
+ },
+ "end": {
+ "line": 11,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 327,
+ 328
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 8
+ },
+ "end": {
+ "line": 12,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 328,
+ 334
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 6
+ }
+ },
+ "value": "export"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 334,
+ 335
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 6
+ },
+ "end": {
+ "line": 12,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 335,
+ 342
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 7
+ },
+ "end": {
+ "line": 12,
+ "column": 14
+ }
+ },
+ "value": "default"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 342,
+ 343
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 14
+ },
+ "end": {
+ "line": 12,
+ "column": 15
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 343,
+ 344
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 15
+ },
+ "end": {
+ "line": 12,
+ "column": 16
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 344,
+ 347
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 16
+ },
+ "end": {
+ "line": 13,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 347,
+ 352
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 2
+ },
+ "end": {
+ "line": 13,
+ "column": 7
+ }
+ },
+ "value": "name:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 352,
+ 353
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 7
+ },
+ "end": {
+ "line": 13,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 353,
+ 359
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 8
+ },
+ "end": {
+ "line": 13,
+ "column": 14
+ }
+ },
+ "value": "'App',"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 359,
+ 362
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 14
+ },
+ "end": {
+ "line": 14,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 362,
+ 373
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 2
+ },
+ "end": {
+ "line": 14,
+ "column": 13
+ }
+ },
+ "value": "components:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 373,
+ 374
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 13
+ },
+ "end": {
+ "line": 14,
+ "column": 14
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 374,
+ 375
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 14
+ },
+ "end": {
+ "line": 14,
+ "column": 15
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 375,
+ 378
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 15
+ },
+ "end": {
+ "line": 15,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 378,
+ 380
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 2
+ },
+ "end": {
+ "line": 15,
+ "column": 4
+ }
+ },
+ "value": "},"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 380,
+ 381
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 4
+ },
+ "end": {
+ "line": 16,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 381,
+ 382
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 1
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 382,
+ 383
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 1
+ },
+ "end": {
+ "line": 17,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 383,
+ 391
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 0
+ },
+ "end": {
+ "line": 17,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 391,
+ 392
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 8
+ },
+ "end": {
+ "line": 17,
+ "column": 9
+ }
+ },
+ "value": ""
+ }
+ ],
+ "comments": [
+ {
+ "type": "HTMLComment",
+ "range": [
+ 0,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 63
+ }
+ },
+ "value": " https://github.com/vuejs/eslint-plugin-vue/issues/1690 "
+ }
+ ],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-11/parser-options.json b/test/fixtures/ast/multiple-scripts-11/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-11/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-11/requirements.json b/test/fixtures/ast/multiple-scripts-11/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-11/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-11/scope.json b/test/fixtures/ast/multiple-scripts-11/scope.json
new file mode 100644
index 00000000..23e5c0ee
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-11/scope.json
@@ -0,0 +1,133 @@
+{
+ "type": "global",
+ "variables": [],
+ "references": [],
+ "childScopes": [
+ {
+ "type": "module",
+ "variables": [
+ {
+ "name": "ref",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "ref",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "ImportBinding",
+ "node": {
+ "type": "ImportSpecifier",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ }
+ },
+ "name": "ref"
+ }
+ ],
+ "references": []
+ },
+ {
+ "name": "computed",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "computed",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "ImportBinding",
+ "node": {
+ "type": "ImportSpecifier",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ }
+ },
+ "name": "computed"
+ }
+ ],
+ "references": []
+ },
+ {
+ "name": "useStore",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "useStore",
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 9
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "ImportBinding",
+ "node": {
+ "type": "ImportSpecifier",
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 9
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ }
+ },
+ "name": "useStore"
+ }
+ ],
+ "references": []
+ }
+ ],
+ "references": [],
+ "childScopes": [],
+ "through": []
+ }
+ ],
+ "through": []
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-11/source.vue b/test/fixtures/ast/multiple-scripts-11/source.vue
new file mode 100644
index 00000000..923d3c47
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-11/source.vue
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-11/token-ranges.json b/test/fixtures/ast/multiple-scripts-11/token-ranges.json
new file mode 100644
index 00000000..b02c52a8
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-11/token-ranges.json
@@ -0,0 +1,143 @@
+[
+ "",
+ "",
+ "// each time uncomment error will print. anything from 'vue'",
+ "// others like this is ok",
+ "\n",
+ "
",
+ "\n ",
+ "",
+ "\n ",
+ "
",
+ "\n",
+ " ",
+ "\n",
+ "",
+ "\n\n",
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-11/tree.json b/test/fixtures/ast/multiple-scripts-11/tree.json
new file mode 100644
index 00000000..9ef29fd9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-11/tree.json
@@ -0,0 +1,82 @@
+[
+ {
+ "type": "VElement",
+ "text": "
\n \n
\n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "\n
",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "class=\"f-c\"",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "class",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "\"f-c\"",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VAttribute",
+ "text": "style=\"height: 100%;\"",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "style",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "\"height: 100%;\"",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": "
",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-2/ast.json b/test/fixtures/ast/multiple-scripts-2/ast.json
new file mode 100644
index 00000000..345cdacc
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-2/ast.json
@@ -0,0 +1,886 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 106,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "range": [
+ 9,
+ 105
+ ],
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "start": 9,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "range": [
+ 9,
+ 28
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 16,
+ 17
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 16,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 16,
+ 17
+ ],
+ "name": "A"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 23,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 14
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "range": [
+ 23,
+ 28
+ ],
+ "value": "./a",
+ "raw": "'./a'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 55,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ },
+ "range": [
+ 55,
+ 74
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 62,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 8
+ }
+ },
+ "range": [
+ 62,
+ 63
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 62,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 8
+ }
+ },
+ "range": [
+ 62,
+ 63
+ ],
+ "name": "B"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 69,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 14
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ },
+ "range": [
+ 69,
+ 74
+ ],
+ "value": "./a",
+ "raw": "'./a'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 75,
+ "end": 87,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "range": [
+ 75,
+ 87
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 81,
+ "end": 87,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 6
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "range": [
+ 81,
+ 87
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 81,
+ "end": 82,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 6
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "range": [
+ 81,
+ 82
+ ],
+ "name": "c"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 85,
+ "end": 87,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "range": [
+ 85,
+ 87
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 88,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "range": [
+ 88,
+ 105
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 94,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "range": [
+ 94,
+ 105
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 94,
+ "end": 95,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "range": [
+ 94,
+ 95
+ ],
+ "name": "d"
+ },
+ "init": {
+ "type": "CallExpression",
+ "start": 98,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "range": [
+ 98,
+ 105
+ ],
+ "callee": {
+ "type": "MemberExpression",
+ "start": 98,
+ "end": 103,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 15
+ }
+ },
+ "range": [
+ 98,
+ 103
+ ],
+ "object": {
+ "type": "Identifier",
+ "start": 98,
+ "end": 99,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 11
+ }
+ },
+ "range": [
+ 98,
+ 99
+ ],
+ "name": "A"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 100,
+ "end": 103,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 15
+ }
+ },
+ "range": [
+ 100,
+ 103
+ ],
+ "name": "use"
+ },
+ "computed": false,
+ "optional": false
+ },
+ "arguments": [],
+ "optional": false
+ }
+ }
+ ],
+ "kind": "const"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 40,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-2/parser-options.json b/test/fixtures/ast/multiple-scripts-2/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-2/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-2/requirements.json b/test/fixtures/ast/multiple-scripts-2/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-2/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-2/source.vue b/test/fixtures/ast/multiple-scripts-2/source.vue
new file mode 100644
index 00000000..c4c3f1e2
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-2/source.vue
@@ -0,0 +1,9 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-2/token-ranges.json b/test/fixtures/ast/multiple-scripts-2/token-ranges.json
new file mode 100644
index 00000000..0570d8ea
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-2/token-ranges.json
@@ -0,0 +1,26 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-2/tree.json b/test/fixtures/ast/multiple-scripts-2/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-2/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-3/ast.json b/test/fixtures/ast/multiple-scripts-3/ast.json
new file mode 100644
index 00000000..85552110
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-3/ast.json
@@ -0,0 +1,749 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 91,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "range": [
+ 9,
+ 90
+ ],
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 9,
+ 17
+ ],
+ "expression": {
+ "type": "Literal",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 9,
+ 17
+ ],
+ "value": "script",
+ "raw": "\"script\""
+ },
+ "directive": "script"
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 76,
+ "end": 90,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "range": [
+ 76,
+ 90
+ ],
+ "expression": {
+ "type": "Literal",
+ "start": 76,
+ "end": 90,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "range": [
+ 76,
+ 90
+ ],
+ "value": "script setup",
+ "raw": "\"script setup\""
+ }
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 61,
+ 75
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 29,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 29,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 39,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 19
+ }
+ },
+ "value": "Template!"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 48,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 8,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 9,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "value": "\"script\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 17,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 18,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 27,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 29,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 38,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 39,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 19
+ }
+ },
+ "value": "Template!"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 48,
+ 58
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 29
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 58,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 29
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 59,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 30
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 61,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 69,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 74,
+ 75
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 75,
+ 76
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 76,
+ 83
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": "\"script"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 83,
+ 84
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 84,
+ 90
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "value": "setup\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 90,
+ 91
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 91,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 99,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 100,
+ 101
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-3/parser-options.json b/test/fixtures/ast/multiple-scripts-3/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-3/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-3/requirements.json b/test/fixtures/ast/multiple-scripts-3/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-3/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-3/source.vue b/test/fixtures/ast/multiple-scripts-3/source.vue
new file mode 100644
index 00000000..e136f806
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-3/source.vue
@@ -0,0 +1,9 @@
+
+
+
Template!
+
+
diff --git a/test/fixtures/ast/multiple-scripts-3/token-ranges.json b/test/fixtures/ast/multiple-scripts-3/token-ranges.json
new file mode 100644
index 00000000..91b6f7d5
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-3/token-ranges.json
@@ -0,0 +1,33 @@
+[
+ "",
+ "",
+ "",
+ "\n\n",
+ "
",
+ "Template!",
+ " ",
+ "\n\n",
+ "",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-3/tree.json b/test/fixtures/ast/multiple-scripts-3/tree.json
new file mode 100644
index 00000000..7cedc5f9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-3/tree.json
@@ -0,0 +1,23 @@
+[
+ {
+ "type": "VElement",
+ "text": "
Template! ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "Template!",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-4/ast.json b/test/fixtures/ast/multiple-scripts-4/ast.json
new file mode 100644
index 00000000..03a1f108
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-4/ast.json
@@ -0,0 +1,851 @@
+{
+ "type": "Program",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 9,
+ 17
+ ],
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 9,
+ 17
+ ],
+ "expression": {
+ "type": "Literal",
+ "start": 9,
+ "end": 17,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 9,
+ 17
+ ],
+ "value": "script",
+ "raw": "\"script\""
+ },
+ "directive": "script"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ }
+ ],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 29,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 29,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 39,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 19
+ }
+ },
+ "value": "Template!"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 48,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 8,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 9,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "value": "\"script\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 17,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 18,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 27,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 29,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 38,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 39,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 19
+ }
+ },
+ "value": "Template!"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 48,
+ 58
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 29
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 58,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 29
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 59,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 30
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 61,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 69,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 74,
+ 75
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 75,
+ 76
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 76,
+ 83
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": "\"script"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 83,
+ 84
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 84,
+ 90
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "value": "setup\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 90,
+ 91
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 91,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 99,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 100,
+ 102
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 11,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 102,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 0
+ },
+ "end": {
+ "line": 11,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 110,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 8
+ },
+ "end": {
+ "line": 11,
+ "column": 15
+ }
+ },
+ "value": "unknown"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 117,
+ 118
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 15
+ },
+ "end": {
+ "line": 11,
+ "column": 16
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 118,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 16
+ },
+ "end": {
+ "line": 12,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 119,
+ 126
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 7
+ }
+ },
+ "value": "\"script"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 126,
+ 127
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 7
+ },
+ "end": {
+ "line": 12,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 127,
+ 135
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 8
+ },
+ "end": {
+ "line": 12,
+ "column": 16
+ }
+ },
+ "value": "unknown\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 135,
+ 136
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 16
+ },
+ "end": {
+ "line": 13,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 136,
+ 144
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 0
+ },
+ "end": {
+ "line": 13,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 144,
+ 145
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 8
+ },
+ "end": {
+ "line": 13,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 145,
+ 146
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 9
+ },
+ "end": {
+ "line": 14,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-4/parser-options.json b/test/fixtures/ast/multiple-scripts-4/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-4/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-4/requirements.json b/test/fixtures/ast/multiple-scripts-4/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-4/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-4/source.vue b/test/fixtures/ast/multiple-scripts-4/source.vue
new file mode 100644
index 00000000..7d1a37de
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-4/source.vue
@@ -0,0 +1,13 @@
+
+
+
Template!
+
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-4/token-ranges.json b/test/fixtures/ast/multiple-scripts-4/token-ranges.json
new file mode 100644
index 00000000..002d3fc9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-4/token-ranges.json
@@ -0,0 +1,41 @@
+[
+ "",
+ "",
+ "\n\n",
+ "
",
+ "Template!",
+ " ",
+ "\n\n",
+ "",
+ "\n\n",
+ "",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-4/tree.json b/test/fixtures/ast/multiple-scripts-4/tree.json
new file mode 100644
index 00000000..7cedc5f9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-4/tree.json
@@ -0,0 +1,23 @@
+[
+ {
+ "type": "VElement",
+ "text": "
Template! ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "Template!",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-5/ast.json b/test/fixtures/ast/multiple-scripts-5/ast.json
new file mode 100644
index 00000000..fd0cbb7d
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-5/ast.json
@@ -0,0 +1,1729 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 145,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ },
+ "range": [
+ 9,
+ 144
+ ],
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 9,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 9,
+ 30
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 16,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 16,
+ 30
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 20,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 20,
+ 30
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "range": [
+ 20,
+ 25
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 28,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 28,
+ 30
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 102,
+ "end": 129,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 27
+ }
+ },
+ "range": [
+ 102,
+ 129
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 109,
+ "end": 112,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 10
+ }
+ },
+ "range": [
+ 109,
+ 112
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 109,
+ "end": 112,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 10
+ }
+ },
+ "range": [
+ 109,
+ 112
+ ],
+ "name": "Foo"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 118,
+ "end": 129,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 16
+ },
+ "end": {
+ "line": 8,
+ "column": 27
+ }
+ },
+ "range": [
+ 118,
+ 129
+ ],
+ "value": "./Foo.vue",
+ "raw": "'./Foo.vue'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 130,
+ "end": 144,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ },
+ "range": [
+ 130,
+ 144
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 134,
+ "end": 144,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ },
+ "range": [
+ 134,
+ 144
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 134,
+ "end": 139,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "range": [
+ 134,
+ 139
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 142,
+ "end": 144,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ },
+ "range": [
+ 142,
+ 144
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 87,
+ 101
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 42,
+ 85
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 43
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 42,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VElement",
+ "range": [
+ 52,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 32
+ }
+ },
+ "name": "foo",
+ "rawName": "Foo",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 52,
+ 57
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 15
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 57,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 15
+ },
+ "end": {
+ "line": 5,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 60,
+ "end": 65,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 23
+ }
+ },
+ "range": [
+ 60,
+ 65
+ ],
+ "name": "count"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 60,
+ "end": 65,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 23
+ }
+ },
+ "range": [
+ 60,
+ 65
+ ],
+ "name": "count"
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 68,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 26
+ },
+ "end": {
+ "line": 5,
+ "column": 32
+ }
+ }
+ },
+ "variables": []
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 74,
+ 85
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 32
+ },
+ "end": {
+ "line": 5,
+ "column": 43
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 8,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 9,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "export"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 15,
+ 16
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 16,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 19,
+ 20
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 20,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 25,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 16
+ },
+ "end": {
+ "line": 2,
+ "column": 17
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 27,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 18
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 28,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "value": "42"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 31,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 39,
+ 40
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 40,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 42,
+ 51
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 51,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 52,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 56,
+ 57
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 14
+ },
+ "end": {
+ "line": 5,
+ "column": 15
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 57,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 15
+ },
+ "end": {
+ "line": 5,
+ "column": 17
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "count",
+ "start": 60,
+ "end": 65,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 23
+ }
+ },
+ "range": [
+ 60,
+ 65
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 66,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 24
+ },
+ "end": {
+ "line": 5,
+ "column": 26
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 68,
+ 73
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 26
+ },
+ "end": {
+ "line": 5,
+ "column": 31
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 73,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 31
+ },
+ "end": {
+ "line": 5,
+ "column": 32
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 74,
+ 84
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 32
+ },
+ "end": {
+ "line": 5,
+ "column": 42
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 84,
+ 85
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 42
+ },
+ "end": {
+ "line": 5,
+ "column": 43
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 85,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 43
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 87,
+ 94
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 95,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 100,
+ 101
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 101,
+ 102
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 102,
+ 108
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 108,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 109,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 10
+ }
+ },
+ "value": "Foo"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 112,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 113,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 11
+ },
+ "end": {
+ "line": 8,
+ "column": 15
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 117,
+ 118
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 15
+ },
+ "end": {
+ "line": 8,
+ "column": 16
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 118,
+ 129
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 16
+ },
+ "end": {
+ "line": 8,
+ "column": 27
+ }
+ },
+ "value": "'./Foo.vue'"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 129,
+ 130
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 27
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 130,
+ 133
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 3
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 133,
+ 134
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 3
+ },
+ "end": {
+ "line": 9,
+ "column": 4
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 134,
+ 139
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 139,
+ 140
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 9,
+ "column": 10
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 140,
+ 141
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 10
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 141,
+ 142
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 9,
+ "column": 12
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 142,
+ 144
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ },
+ "value": "42"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 144,
+ 145
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 14
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 145,
+ 153
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 153,
+ 154
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 8
+ },
+ "end": {
+ "line": 10,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 154,
+ 155
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 9
+ },
+ "end": {
+ "line": 11,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-5/parser-options.json b/test/fixtures/ast/multiple-scripts-5/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-5/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-5/requirements.json b/test/fixtures/ast/multiple-scripts-5/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-5/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-5/source.vue b/test/fixtures/ast/multiple-scripts-5/source.vue
new file mode 100644
index 00000000..267b0f65
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-5/source.vue
@@ -0,0 +1,10 @@
+
+
+
{{ count }}
+
+
diff --git a/test/fixtures/ast/multiple-scripts-5/token-ranges.json b/test/fixtures/ast/multiple-scripts-5/token-ranges.json
new file mode 100644
index 00000000..5da2f7d5
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-5/token-ranges.json
@@ -0,0 +1,70 @@
+[
+ "",
+ "",
+ "",
+ "\n\n",
+ "
",
+ "",
+ "{{",
+ "count",
+ "}}",
+ " ",
+ " ",
+ "\n\n",
+ "",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-5/tree.json b/test/fixtures/ast/multiple-scripts-5/tree.json
new file mode 100644
index 00000000..f84d7918
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-5/tree.json
@@ -0,0 +1,45 @@
+[
+ {
+ "type": "VElement",
+ "text": "
{{ count }} ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "{{ count }} ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ count }}",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "count",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-6/ast.json b/test/fixtures/ast/multiple-scripts-6/ast.json
new file mode 100644
index 00000000..4d97bdcb
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-6/ast.json
@@ -0,0 +1,583 @@
+{
+ "type": "Program",
+ "start": 14,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ },
+ "range": [
+ 15,
+ 97
+ ],
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 15,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 15,
+ 28
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 19,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 19,
+ 28
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 24,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 24
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 27,
+ "end": 28,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 27,
+ 28
+ ],
+ "value": 0,
+ "raw": "0"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "ExpressionStatement",
+ "start": 48,
+ "end": 73,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 25
+ }
+ },
+ "range": [
+ 48,
+ 73
+ ],
+ "expression": {
+ "type": "CallExpression",
+ "start": 48,
+ "end": 73,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 25
+ }
+ },
+ "range": [
+ 48,
+ 73
+ ],
+ "callee": {
+ "type": "Identifier",
+ "start": 48,
+ "end": 71,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 23
+ }
+ },
+ "range": [
+ 48,
+ 71
+ ],
+ "name": "performGlobalSideEffect"
+ },
+ "arguments": [],
+ "optional": false
+ }
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 75,
+ "end": 97,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ },
+ "range": [
+ 75,
+ 97
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 82,
+ "end": 97,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 7
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ },
+ "range": [
+ 82,
+ 97
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 88,
+ "end": 97,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ },
+ "range": [
+ 88,
+ 97
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 88,
+ "end": 93,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 18
+ }
+ },
+ "range": [
+ 88,
+ 93
+ ],
+ "name": "named"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 96,
+ "end": 97,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 21
+ },
+ "end": {
+ "line": 7,
+ "column": 22
+ }
+ },
+ "range": [
+ 96,
+ 97
+ ],
+ "value": 1,
+ "raw": "1"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 14
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 39,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 0
+ },
+ "end": {
+ "line": 4,
+ "column": 8
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-6/parser-options.json b/test/fixtures/ast/multiple-scripts-6/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-6/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-6/requirements.json b/test/fixtures/ast/multiple-scripts-6/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-6/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-6/source.vue b/test/fixtures/ast/multiple-scripts-6/source.vue
new file mode 100644
index 00000000..ecaf529b
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-6/source.vue
@@ -0,0 +1,8 @@
+
+
diff --git a/test/fixtures/ast/multiple-scripts-6/token-ranges.json b/test/fixtures/ast/multiple-scripts-6/token-ranges.json
new file mode 100644
index 00000000..fb1b1bda
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-6/token-ranges.json
@@ -0,0 +1,18 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-6/tree.json b/test/fixtures/ast/multiple-scripts-6/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-6/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-7/ast.json b/test/fixtures/ast/multiple-scripts-7/ast.json
new file mode 100644
index 00000000..ca60f41a
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-7/ast.json
@@ -0,0 +1,2685 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 178,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "range": [
+ 9,
+ 177
+ ],
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 9,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 9,
+ 30
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 16,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 16,
+ 30
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 20,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 20,
+ 30
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "range": [
+ 20,
+ 25
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 28,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 28,
+ 30
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 57,
+ "end": 102,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 45
+ }
+ },
+ "range": [
+ 57,
+ 102
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 64,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ },
+ "range": [
+ 64,
+ 76
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 64,
+ "end": 76,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ },
+ "range": [
+ 64,
+ 76
+ ],
+ "name": "MyComponent1"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 82,
+ "end": 102,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 25
+ },
+ "end": {
+ "line": 6,
+ "column": 45
+ }
+ },
+ "range": [
+ 82,
+ 102
+ ],
+ "value": "./MyComponent1.vue",
+ "raw": "'./MyComponent1.vue'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 103,
+ "end": 117,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "range": [
+ 103,
+ 117
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 107,
+ "end": 117,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "range": [
+ 107,
+ 117
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 107,
+ "end": 112,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ },
+ "range": [
+ 107,
+ 112
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 115,
+ "end": 117,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 12
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "range": [
+ 115,
+ 117
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 118,
+ "end": 163,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 45
+ }
+ },
+ "range": [
+ 118,
+ 163
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 125,
+ "end": 137,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ },
+ "range": [
+ 125,
+ 137
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 125,
+ "end": 137,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ },
+ "range": [
+ 125,
+ 137
+ ],
+ "name": "MyComponent2"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 143,
+ "end": 163,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 25
+ },
+ "end": {
+ "line": 8,
+ "column": 45
+ }
+ },
+ "range": [
+ 143,
+ 163
+ ],
+ "value": "./MyComponent2.vue",
+ "raw": "'./MyComponent2.vue'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 164,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "range": [
+ 164,
+ 177
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 168,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "range": [
+ 168,
+ 177
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 168,
+ "end": 169,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ },
+ "range": [
+ 168,
+ 169
+ ],
+ "name": "a"
+ },
+ "init": {
+ "type": "BinaryExpression",
+ "start": 172,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "range": [
+ 172,
+ 177
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 172,
+ "end": 173,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "range": [
+ 172,
+ 173
+ ],
+ "name": "b"
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 176,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "range": [
+ 176,
+ 177
+ ],
+ "name": "c"
+ }
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 42,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 189,
+ 276
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 189,
+ 199
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 199,
+ 204
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 10
+ },
+ "end": {
+ "line": 13,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 204,
+ 244
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 4
+ },
+ "end": {
+ "line": 13,
+ "column": 44
+ }
+ },
+ "name": "mycomponent1",
+ "rawName": "MyComponent1",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 204,
+ 218
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 4
+ },
+ "end": {
+ "line": 13,
+ "column": 18
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 218,
+ 229
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 18
+ },
+ "end": {
+ "line": 13,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 221,
+ "end": 226,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 21
+ },
+ "end": {
+ "line": 13,
+ "column": 26
+ }
+ },
+ "range": [
+ 221,
+ 226
+ ],
+ "name": "count"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 221,
+ "end": 226,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 21
+ },
+ "end": {
+ "line": 13,
+ "column": 26
+ }
+ },
+ "range": [
+ 221,
+ 226
+ ],
+ "name": "count"
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 229,
+ 244
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 29
+ },
+ "end": {
+ "line": 13,
+ "column": 44
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 244,
+ 249
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 44
+ },
+ "end": {
+ "line": 14,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 249,
+ 264
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 4
+ },
+ "end": {
+ "line": 14,
+ "column": 19
+ }
+ },
+ "name": "mycomponent2",
+ "rawName": "MyComponent2",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 249,
+ 264
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 4
+ },
+ "end": {
+ "line": 14,
+ "column": 19
+ }
+ },
+ "selfClosing": true,
+ "attributes": []
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 264,
+ 265
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 19
+ },
+ "end": {
+ "line": 15,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 265,
+ 276
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 8,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 9,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "export"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 15,
+ 16
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 16,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 19,
+ 20
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 20,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 25,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 16
+ },
+ "end": {
+ "line": 2,
+ "column": 17
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 27,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 18
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 28,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "value": "42"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 31,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 39,
+ 40
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 40,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 42,
+ 49
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 50,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 55,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 13
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 56,
+ 57
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 14
+ },
+ "end": {
+ "line": 6,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 57,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 63,
+ 64
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 64,
+ 76
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ },
+ "value": "MyComponent1"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 76,
+ 77
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 19
+ },
+ "end": {
+ "line": 6,
+ "column": 20
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 77,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 20
+ },
+ "end": {
+ "line": 6,
+ "column": 24
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 81,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 24
+ },
+ "end": {
+ "line": 6,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 82,
+ 102
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 25
+ },
+ "end": {
+ "line": 6,
+ "column": 45
+ }
+ },
+ "value": "'./MyComponent1.vue'"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 102,
+ 103
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 45
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 103,
+ 106
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 3
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 106,
+ 107
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 3
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 107,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 112,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 10
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 113,
+ 114
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 11
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 114,
+ 115
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 11
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 115,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 12
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": "42"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 117,
+ 118
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 118,
+ 124
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 124,
+ 125
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 125,
+ 137
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ },
+ "value": "MyComponent2"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 137,
+ 138
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 19
+ },
+ "end": {
+ "line": 8,
+ "column": 20
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 138,
+ 142
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 20
+ },
+ "end": {
+ "line": 8,
+ "column": 24
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 142,
+ 143
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 24
+ },
+ "end": {
+ "line": 8,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 143,
+ 163
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 25
+ },
+ "end": {
+ "line": 8,
+ "column": 45
+ }
+ },
+ "value": "'./MyComponent2.vue'"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 163,
+ 164
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 45
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 164,
+ 167
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 3
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 167,
+ 168
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 3
+ },
+ "end": {
+ "line": 9,
+ "column": 4
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 168,
+ 169
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ },
+ "value": "a"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 169,
+ 170
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 5
+ },
+ "end": {
+ "line": 9,
+ "column": 6
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 170,
+ 171
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 6
+ },
+ "end": {
+ "line": 9,
+ "column": 7
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 171,
+ 172
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 7
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 172,
+ 173
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": "b"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 173,
+ 174
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 9,
+ "column": 10
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 174,
+ 175
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 10
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "value": "+"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 175,
+ 176
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 9,
+ "column": 12
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 176,
+ 177
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "value": "c"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 177,
+ 178
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 13
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 178,
+ 186
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 186,
+ 187
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 8
+ },
+ "end": {
+ "line": 10,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 187,
+ 189
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 9
+ },
+ "end": {
+ "line": 12,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 189,
+ 198
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 198,
+ 199
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 9
+ },
+ "end": {
+ "line": 12,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 199,
+ 204
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 10
+ },
+ "end": {
+ "line": 13,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 204,
+ 217
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 4
+ },
+ "end": {
+ "line": 13,
+ "column": 17
+ }
+ },
+ "value": "mycomponent1"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 217,
+ 218
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 17
+ },
+ "end": {
+ "line": 13,
+ "column": 18
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 218,
+ 220
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 18
+ },
+ "end": {
+ "line": 13,
+ "column": 20
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "count",
+ "start": 221,
+ "end": 226,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 21
+ },
+ "end": {
+ "line": 13,
+ "column": 26
+ }
+ },
+ "range": [
+ 221,
+ 226
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 227,
+ 229
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 27
+ },
+ "end": {
+ "line": 13,
+ "column": 29
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 229,
+ 243
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 29
+ },
+ "end": {
+ "line": 13,
+ "column": 43
+ }
+ },
+ "value": "mycomponent1"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 243,
+ 244
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 43
+ },
+ "end": {
+ "line": 13,
+ "column": 44
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 244,
+ 249
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 44
+ },
+ "end": {
+ "line": 14,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 249,
+ 262
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 4
+ },
+ "end": {
+ "line": 14,
+ "column": 17
+ }
+ },
+ "value": "mycomponent2"
+ },
+ {
+ "type": "HTMLSelfClosingTagClose",
+ "range": [
+ 262,
+ 264
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 17
+ },
+ "end": {
+ "line": 14,
+ "column": 19
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 264,
+ 265
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 19
+ },
+ "end": {
+ "line": 15,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 265,
+ 275
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 275,
+ 276
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 10
+ },
+ "end": {
+ "line": 15,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 276,
+ 278
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 11
+ },
+ "end": {
+ "line": 17,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ }
+ ],
+ "comments": [],
+ "errors": [
+ {
+ "message": "non-void-html-element-start-tag-with-trailing-solidus",
+ "index": 249,
+ "lineNumber": 14,
+ "column": 4
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-7/parser-options.json b/test/fixtures/ast/multiple-scripts-7/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-7/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-7/requirements.json b/test/fixtures/ast/multiple-scripts-7/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-7/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-7/scope.json b/test/fixtures/ast/multiple-scripts-7/scope.json
new file mode 100644
index 00000000..18858c17
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-7/scope.json
@@ -0,0 +1,615 @@
+{
+ "type": "global",
+ "variables": [],
+ "references": [],
+ "childScopes": [
+ {
+ "type": "module",
+ "variables": [
+ {
+ "name": "count",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "Variable",
+ "node": {
+ "type": "VariableDeclarator",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "name": "count"
+ },
+ {
+ "type": "Variable",
+ "node": {
+ "type": "VariableDeclarator",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ }
+ },
+ "name": "count"
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": true
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": true
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": null,
+ "vueUsedInTemplate": true
+ }
+ ]
+ },
+ {
+ "name": "MyComponent1",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "MyComponent1",
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "ImportBinding",
+ "node": {
+ "type": "ImportDefaultSpecifier",
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ },
+ "name": "MyComponent1"
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "MyComponent1",
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "MyComponent1",
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ },
+ "init": null,
+ "vueUsedInTemplate": true
+ }
+ ]
+ },
+ {
+ "name": "MyComponent2",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "MyComponent2",
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "ImportBinding",
+ "node": {
+ "type": "ImportDefaultSpecifier",
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ }
+ },
+ "name": "MyComponent2"
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "MyComponent2",
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "MyComponent2",
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ }
+ },
+ "init": null,
+ "vueUsedInTemplate": true
+ }
+ ]
+ },
+ {
+ "name": "a",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "Variable",
+ "node": {
+ "type": "VariableDeclarator",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ },
+ "init": true
+ }
+ ]
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": true
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": true
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ },
+ "init": true
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "b",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "c",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ }
+ ],
+ "childScopes": [],
+ "through": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "b",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "c",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ }
+ ]
+ }
+ ],
+ "through": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "b",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "c",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-7/source.vue b/test/fixtures/ast/multiple-scripts-7/source.vue
new file mode 100644
index 00000000..3bd3b5d1
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-7/source.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+ {{ count }}
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-7/token-ranges.json b/test/fixtures/ast/multiple-scripts-7/token-ranges.json
new file mode 100644
index 00000000..acbbc20c
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-7/token-ranges.json
@@ -0,0 +1,105 @@
+[
+ "",
+ "",
+ "",
+ "\n\n",
+ "",
+ "\n\n",
+ "
",
+ "\n ",
+ "",
+ "{{",
+ "count",
+ "}}",
+ " ",
+ "\n ",
+ " ",
+ "\n",
+ " ",
+ "\n\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-7/tree.json b/test/fixtures/ast/multiple-scripts-7/tree.json
new file mode 100644
index 00000000..b3d62709
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-7/tree.json
@@ -0,0 +1,71 @@
+[
+ {
+ "type": "VElement",
+ "text": "
\n {{ count }} \n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "{{ count }} ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ count }}",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "count",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-8/ast.json b/test/fixtures/ast/multiple-scripts-8/ast.json
new file mode 100644
index 00000000..2055eb94
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-8/ast.json
@@ -0,0 +1,3448 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 340,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 17,
+ "column": 13
+ }
+ },
+ "range": [
+ 20,
+ 316
+ ],
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 20,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "range": [
+ 20,
+ 41
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 27,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "range": [
+ 27,
+ 41
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 31,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "range": [
+ 31,
+ 41
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 16
+ }
+ },
+ "range": [
+ 31,
+ 36
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 39,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 19
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "range": [
+ 39,
+ 41
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 100,
+ "end": 108,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "range": [
+ 100,
+ 108
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 104,
+ "end": 107,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 7
+ }
+ },
+ "range": [
+ 104,
+ 107
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 104,
+ "end": 107,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 7
+ }
+ },
+ "range": [
+ 104,
+ 107
+ ],
+ "name": "foo"
+ },
+ "init": null
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 130,
+ "end": 175,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 0
+ },
+ "end": {
+ "line": 11,
+ "column": 45
+ }
+ },
+ "range": [
+ 130,
+ 175
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 137,
+ "end": 149,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 7
+ },
+ "end": {
+ "line": 11,
+ "column": 19
+ }
+ },
+ "range": [
+ 137,
+ 149
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 137,
+ "end": 149,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 7
+ },
+ "end": {
+ "line": 11,
+ "column": 19
+ }
+ },
+ "range": [
+ 137,
+ 149
+ ],
+ "name": "MyComponent1"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 155,
+ "end": 175,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 25
+ },
+ "end": {
+ "line": 11,
+ "column": 45
+ }
+ },
+ "range": [
+ 155,
+ 175
+ ],
+ "value": "./MyComponent1.vue",
+ "raw": "'./MyComponent1.vue'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 197,
+ "end": 211,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 0
+ },
+ "end": {
+ "line": 13,
+ "column": 14
+ }
+ },
+ "range": [
+ 197,
+ 211
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 201,
+ "end": 211,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 4
+ },
+ "end": {
+ "line": 13,
+ "column": 14
+ }
+ },
+ "range": [
+ 201,
+ 211
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 201,
+ "end": 206,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 4
+ },
+ "end": {
+ "line": 13,
+ "column": 9
+ }
+ },
+ "range": [
+ 201,
+ 206
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 209,
+ "end": 211,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 12
+ },
+ "end": {
+ "line": 13,
+ "column": 14
+ }
+ },
+ "range": [
+ 209,
+ 211
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 234,
+ "end": 279,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 45
+ }
+ },
+ "range": [
+ 234,
+ 279
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 241,
+ "end": 253,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 7
+ },
+ "end": {
+ "line": 15,
+ "column": 19
+ }
+ },
+ "range": [
+ 241,
+ 253
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 241,
+ "end": 253,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 7
+ },
+ "end": {
+ "line": 15,
+ "column": 19
+ }
+ },
+ "range": [
+ 241,
+ 253
+ ],
+ "name": "MyComponent2"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 259,
+ "end": 279,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 25
+ },
+ "end": {
+ "line": 15,
+ "column": 45
+ }
+ },
+ "range": [
+ 259,
+ 279
+ ],
+ "value": "./MyComponent2.vue",
+ "raw": "'./MyComponent2.vue'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 303,
+ "end": 316,
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 0
+ },
+ "end": {
+ "line": 17,
+ "column": 13
+ }
+ },
+ "range": [
+ 303,
+ 316
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 307,
+ "end": 316,
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 4
+ },
+ "end": {
+ "line": 17,
+ "column": 13
+ }
+ },
+ "range": [
+ 307,
+ 316
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 307,
+ "end": 308,
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 4
+ },
+ "end": {
+ "line": 17,
+ "column": 5
+ }
+ },
+ "range": [
+ 307,
+ 308
+ ],
+ "name": "a"
+ },
+ "init": {
+ "type": "BinaryExpression",
+ "start": 311,
+ "end": 316,
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 8
+ },
+ "end": {
+ "line": 17,
+ "column": 13
+ }
+ },
+ "range": [
+ 311,
+ 316
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 311,
+ "end": 312,
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 8
+ },
+ "end": {
+ "line": 17,
+ "column": 9
+ }
+ },
+ "range": [
+ 311,
+ 312
+ ],
+ "name": "b"
+ },
+ "operator": "+",
+ "right": {
+ "type": "Identifier",
+ "start": 315,
+ "end": 316,
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 12
+ },
+ "end": {
+ "line": 17,
+ "column": 13
+ }
+ },
+ "range": [
+ 315,
+ 316
+ ],
+ "name": "c"
+ }
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [
+ {
+ "type": "Line",
+ "value": "comment1",
+ "start": 9,
+ "end": 19,
+ "range": [
+ 9,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment2",
+ "start": 41,
+ "end": 51,
+ "range": [
+ 41,
+ 51
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 31
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment3",
+ "start": 52,
+ "end": 62,
+ "range": [
+ 52,
+ 62
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 0
+ },
+ "end": {
+ "line": 4,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment4",
+ "start": 89,
+ "end": 99,
+ "range": [
+ 89,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment5",
+ "start": 108,
+ "end": 118,
+ "range": [
+ 108,
+ 118
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 18
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment6",
+ "start": 119,
+ "end": 129,
+ "range": [
+ 119,
+ 129
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment7",
+ "start": 175,
+ "end": 185,
+ "range": [
+ 175,
+ 185
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 45
+ },
+ "end": {
+ "line": 11,
+ "column": 55
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment8",
+ "start": 186,
+ "end": 196,
+ "range": [
+ 186,
+ 196
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 10
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment9",
+ "start": 211,
+ "end": 221,
+ "range": [
+ 211,
+ 221
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 14
+ },
+ "end": {
+ "line": 13,
+ "column": 24
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment10",
+ "start": 222,
+ "end": 233,
+ "range": [
+ 222,
+ 233
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 0
+ },
+ "end": {
+ "line": 14,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment11",
+ "start": 279,
+ "end": 290,
+ "range": [
+ 279,
+ 290
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 45
+ },
+ "end": {
+ "line": 15,
+ "column": 56
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment12",
+ "start": 291,
+ "end": 302,
+ "range": [
+ 291,
+ 302
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 11
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment13",
+ "start": 316,
+ "end": 327,
+ "range": [
+ 316,
+ 327
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 13
+ },
+ "end": {
+ "line": 17,
+ "column": 24
+ }
+ }
+ },
+ {
+ "type": "Line",
+ "value": "comment14",
+ "start": 328,
+ "end": 339,
+ "range": [
+ 328,
+ 339
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 0
+ },
+ "end": {
+ "line": 18,
+ "column": 11
+ }
+ }
+ }
+ ],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 74,
+ 88
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 351,
+ 438
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 0
+ },
+ "end": {
+ "line": 24,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 351,
+ 361
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 0
+ },
+ "end": {
+ "line": 21,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 361,
+ 366
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 10
+ },
+ "end": {
+ "line": 22,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 366,
+ 406
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 4
+ },
+ "end": {
+ "line": 22,
+ "column": 44
+ }
+ },
+ "name": "mycomponent1",
+ "rawName": "MyComponent1",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 366,
+ 380
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 4
+ },
+ "end": {
+ "line": 22,
+ "column": 18
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 380,
+ 391
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 18
+ },
+ "end": {
+ "line": 22,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 383,
+ "end": 388,
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 21
+ },
+ "end": {
+ "line": 22,
+ "column": 26
+ }
+ },
+ "range": [
+ 383,
+ 388
+ ],
+ "name": "count"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 383,
+ "end": 388,
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 21
+ },
+ "end": {
+ "line": 22,
+ "column": 26
+ }
+ },
+ "range": [
+ 383,
+ 388
+ ],
+ "name": "count"
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 391,
+ 406
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 29
+ },
+ "end": {
+ "line": 22,
+ "column": 44
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 406,
+ 411
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 44
+ },
+ "end": {
+ "line": 23,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 411,
+ 426
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 4
+ },
+ "end": {
+ "line": 23,
+ "column": 19
+ }
+ },
+ "name": "mycomponent2",
+ "rawName": "MyComponent2",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 411,
+ 426
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 4
+ },
+ "end": {
+ "line": 23,
+ "column": 19
+ }
+ },
+ "selfClosing": true,
+ "attributes": []
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 426,
+ 427
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 19
+ },
+ "end": {
+ "line": 24,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 427,
+ 438
+ ],
+ "loc": {
+ "start": {
+ "line": 24,
+ "column": 0
+ },
+ "end": {
+ "line": 24,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 8,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 9,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "value": "//comment1"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 19,
+ 20
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 20,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 6
+ }
+ },
+ "value": "export"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 27,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 31,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 16
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 36,
+ 37
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 16
+ },
+ "end": {
+ "line": 3,
+ "column": 17
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 37,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 18
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 38,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 18
+ },
+ "end": {
+ "line": 3,
+ "column": 19
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 39,
+ 51
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 19
+ },
+ "end": {
+ "line": 3,
+ "column": 31
+ }
+ },
+ "value": "42//comment2"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 51,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 31
+ },
+ "end": {
+ "line": 4,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 52,
+ 62
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 0
+ },
+ "end": {
+ "line": 4,
+ "column": 10
+ }
+ },
+ "value": "//comment3"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 62,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 63,
+ 71
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 71,
+ 72
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 72,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 74,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 82,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 87,
+ 88
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 88,
+ 89
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 89,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 10
+ }
+ },
+ "value": "//comment4"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 99,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 100,
+ 103
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 3
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 103,
+ 104
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 3
+ },
+ "end": {
+ "line": 9,
+ "column": 4
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 104,
+ 118
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 18
+ }
+ },
+ "value": "foo;//comment5"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 118,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 18
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 119,
+ 129
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 10
+ }
+ },
+ "value": "//comment6"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 129,
+ 130
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 10
+ },
+ "end": {
+ "line": 11,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 130,
+ 136
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 0
+ },
+ "end": {
+ "line": 11,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 136,
+ 137
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 6
+ },
+ "end": {
+ "line": 11,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 137,
+ 149
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 7
+ },
+ "end": {
+ "line": 11,
+ "column": 19
+ }
+ },
+ "value": "MyComponent1"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 149,
+ 150
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 19
+ },
+ "end": {
+ "line": 11,
+ "column": 20
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 150,
+ 154
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 20
+ },
+ "end": {
+ "line": 11,
+ "column": 24
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 154,
+ 155
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 24
+ },
+ "end": {
+ "line": 11,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 155,
+ 185
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 25
+ },
+ "end": {
+ "line": 11,
+ "column": 55
+ }
+ },
+ "value": "'./MyComponent1.vue'//comment7"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 185,
+ 186
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 55
+ },
+ "end": {
+ "line": 12,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 186,
+ 196
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 10
+ }
+ },
+ "value": "//comment8"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 196,
+ 197
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 10
+ },
+ "end": {
+ "line": 13,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 197,
+ 200
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 0
+ },
+ "end": {
+ "line": 13,
+ "column": 3
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 200,
+ 201
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 3
+ },
+ "end": {
+ "line": 13,
+ "column": 4
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 201,
+ 206
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 4
+ },
+ "end": {
+ "line": 13,
+ "column": 9
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 206,
+ 207
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 9
+ },
+ "end": {
+ "line": 13,
+ "column": 10
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 207,
+ 208
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 10
+ },
+ "end": {
+ "line": 13,
+ "column": 11
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 208,
+ 209
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 11
+ },
+ "end": {
+ "line": 13,
+ "column": 12
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 209,
+ 221
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 12
+ },
+ "end": {
+ "line": 13,
+ "column": 24
+ }
+ },
+ "value": "42//comment9"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 221,
+ 222
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 24
+ },
+ "end": {
+ "line": 14,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 222,
+ 233
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 0
+ },
+ "end": {
+ "line": 14,
+ "column": 11
+ }
+ },
+ "value": "//comment10"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 233,
+ 234
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 11
+ },
+ "end": {
+ "line": 15,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 234,
+ 240
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 240,
+ 241
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 6
+ },
+ "end": {
+ "line": 15,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 241,
+ 253
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 7
+ },
+ "end": {
+ "line": 15,
+ "column": 19
+ }
+ },
+ "value": "MyComponent2"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 253,
+ 254
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 19
+ },
+ "end": {
+ "line": 15,
+ "column": 20
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 254,
+ 258
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 20
+ },
+ "end": {
+ "line": 15,
+ "column": 24
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 258,
+ 259
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 24
+ },
+ "end": {
+ "line": 15,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 259,
+ 290
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 25
+ },
+ "end": {
+ "line": 15,
+ "column": 56
+ }
+ },
+ "value": "'./MyComponent2.vue'//comment11"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 290,
+ 291
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 56
+ },
+ "end": {
+ "line": 16,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 291,
+ 302
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 11
+ }
+ },
+ "value": "//comment12"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 302,
+ 303
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 11
+ },
+ "end": {
+ "line": 17,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 303,
+ 306
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 0
+ },
+ "end": {
+ "line": 17,
+ "column": 3
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 306,
+ 307
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 3
+ },
+ "end": {
+ "line": 17,
+ "column": 4
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 307,
+ 308
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 4
+ },
+ "end": {
+ "line": 17,
+ "column": 5
+ }
+ },
+ "value": "a"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 308,
+ 309
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 5
+ },
+ "end": {
+ "line": 17,
+ "column": 6
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 309,
+ 310
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 6
+ },
+ "end": {
+ "line": 17,
+ "column": 7
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 310,
+ 311
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 7
+ },
+ "end": {
+ "line": 17,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 311,
+ 312
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 8
+ },
+ "end": {
+ "line": 17,
+ "column": 9
+ }
+ },
+ "value": "b"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 312,
+ 313
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 9
+ },
+ "end": {
+ "line": 17,
+ "column": 10
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 313,
+ 314
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 10
+ },
+ "end": {
+ "line": 17,
+ "column": 11
+ }
+ },
+ "value": "+"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 314,
+ 315
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 11
+ },
+ "end": {
+ "line": 17,
+ "column": 12
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 315,
+ 327
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 12
+ },
+ "end": {
+ "line": 17,
+ "column": 24
+ }
+ },
+ "value": "c//comment13"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 327,
+ 328
+ ],
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 24
+ },
+ "end": {
+ "line": 18,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 328,
+ 339
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 0
+ },
+ "end": {
+ "line": 18,
+ "column": 11
+ }
+ },
+ "value": "//comment14"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 339,
+ 340
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 11
+ },
+ "end": {
+ "line": 19,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 340,
+ 348
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 0
+ },
+ "end": {
+ "line": 19,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 348,
+ 349
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 8
+ },
+ "end": {
+ "line": 19,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 349,
+ 351
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 9
+ },
+ "end": {
+ "line": 21,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 351,
+ 360
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 0
+ },
+ "end": {
+ "line": 21,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 360,
+ 361
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 9
+ },
+ "end": {
+ "line": 21,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 361,
+ 366
+ ],
+ "loc": {
+ "start": {
+ "line": 21,
+ "column": 10
+ },
+ "end": {
+ "line": 22,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 366,
+ 379
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 4
+ },
+ "end": {
+ "line": 22,
+ "column": 17
+ }
+ },
+ "value": "mycomponent1"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 379,
+ 380
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 17
+ },
+ "end": {
+ "line": 22,
+ "column": 18
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 380,
+ 382
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 18
+ },
+ "end": {
+ "line": 22,
+ "column": 20
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "count",
+ "start": 383,
+ "end": 388,
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 21
+ },
+ "end": {
+ "line": 22,
+ "column": 26
+ }
+ },
+ "range": [
+ 383,
+ 388
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 389,
+ 391
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 27
+ },
+ "end": {
+ "line": 22,
+ "column": 29
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 391,
+ 405
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 29
+ },
+ "end": {
+ "line": 22,
+ "column": 43
+ }
+ },
+ "value": "mycomponent1"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 405,
+ 406
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 43
+ },
+ "end": {
+ "line": 22,
+ "column": 44
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 406,
+ 411
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 44
+ },
+ "end": {
+ "line": 23,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 411,
+ 424
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 4
+ },
+ "end": {
+ "line": 23,
+ "column": 17
+ }
+ },
+ "value": "mycomponent2"
+ },
+ {
+ "type": "HTMLSelfClosingTagClose",
+ "range": [
+ 424,
+ 426
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 17
+ },
+ "end": {
+ "line": 23,
+ "column": 19
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 426,
+ 427
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 19
+ },
+ "end": {
+ "line": 24,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 427,
+ 437
+ ],
+ "loc": {
+ "start": {
+ "line": 24,
+ "column": 0
+ },
+ "end": {
+ "line": 24,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 437,
+ 438
+ ],
+ "loc": {
+ "start": {
+ "line": 24,
+ "column": 10
+ },
+ "end": {
+ "line": 24,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 438,
+ 440
+ ],
+ "loc": {
+ "start": {
+ "line": 24,
+ "column": 11
+ },
+ "end": {
+ "line": 26,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ }
+ ],
+ "comments": [],
+ "errors": [
+ {
+ "message": "non-void-html-element-start-tag-with-trailing-solidus",
+ "index": 411,
+ "lineNumber": 23,
+ "column": 4
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-8/parser-options.json b/test/fixtures/ast/multiple-scripts-8/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-8/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-8/requirements.json b/test/fixtures/ast/multiple-scripts-8/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-8/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-8/source.vue b/test/fixtures/ast/multiple-scripts-8/source.vue
new file mode 100644
index 00000000..64663ded
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-8/source.vue
@@ -0,0 +1,25 @@
+
+
+
+
+
+ {{ count }}
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-8/token-ranges.json b/test/fixtures/ast/multiple-scripts-8/token-ranges.json
new file mode 100644
index 00000000..69888352
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-8/token-ranges.json
@@ -0,0 +1,142 @@
+[
+ "",
+ "",
+ "//comment1",
+ "//comment2",
+ "//comment3",
+ "//comment4",
+ "//comment5",
+ "//comment6",
+ "//comment7",
+ "//comment8",
+ "//comment9",
+ "//comment10",
+ "//comment11",
+ "//comment12",
+ "//comment13",
+ "//comment14",
+ "",
+ "\n\n",
+ "",
+ "\n\n",
+ "
",
+ "\n ",
+ "",
+ "{{",
+ "count",
+ "}}",
+ " ",
+ "\n ",
+ " ",
+ "\n",
+ " ",
+ "\n\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-8/tree.json b/test/fixtures/ast/multiple-scripts-8/tree.json
new file mode 100644
index 00000000..b3d62709
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-8/tree.json
@@ -0,0 +1,71 @@
+[
+ {
+ "type": "VElement",
+ "text": "
\n {{ count }} \n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "{{ count }} ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ count }}",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "count",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-9/ast.json b/test/fixtures/ast/multiple-scripts-9/ast.json
new file mode 100644
index 00000000..00d1ffaf
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-9/ast.json
@@ -0,0 +1,259 @@
+{
+ "type": "Program",
+ "start": 2,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 2
+ },
+ "end": {
+ "line": 4,
+ "column": 13
+ }
+ },
+ "range": [
+ 2,
+ 47
+ ],
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 34,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 0
+ },
+ "end": {
+ "line": 4,
+ "column": 13
+ }
+ },
+ "range": [
+ 34,
+ 47
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 38,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 13
+ }
+ },
+ "range": [
+ 38,
+ 47
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 38,
+ "end": 43,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "range": [
+ 38,
+ 43
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 46,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 12
+ },
+ "end": {
+ "line": 4,
+ "column": 13
+ }
+ },
+ "range": [
+ 46,
+ 47
+ ],
+ "value": 0,
+ "raw": "0"
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 19,
+ 33
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-9/parser-options.json b/test/fixtures/ast/multiple-scripts-9/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-9/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-9/requirements.json b/test/fixtures/ast/multiple-scripts-9/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-9/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-9/source.vue b/test/fixtures/ast/multiple-scripts-9/source.vue
new file mode 100644
index 00000000..90521f52
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-9/source.vue
@@ -0,0 +1,5 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-9/token-ranges.json b/test/fixtures/ast/multiple-scripts-9/token-ranges.json
new file mode 100644
index 00000000..1530a12e
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-9/token-ranges.json
@@ -0,0 +1,10 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-9/tree.json b/test/fixtures/ast/multiple-scripts-9/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-9/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export01/ast.json b/test/fixtures/ast/multiple-scripts-with-export01/ast.json
new file mode 100644
index 00000000..9b0ae9fb
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export01/ast.json
@@ -0,0 +1,463 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 75,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 25
+ }
+ },
+ "range": [
+ 9,
+ 74
+ ],
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 9,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 9,
+ 22
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 13,
+ 22
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 13,
+ 18
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 21,
+ 22
+ ],
+ "value": 0,
+ "raw": "0"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 49,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 25
+ }
+ },
+ "range": [
+ 49,
+ 74
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 56,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 25
+ }
+ },
+ "range": [
+ 56,
+ 74
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 60,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 11
+ },
+ "end": {
+ "line": 6,
+ "column": 25
+ }
+ },
+ "range": [
+ 60,
+ 74
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 60,
+ "end": 63,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 11
+ },
+ "end": {
+ "line": 6,
+ "column": 14
+ }
+ },
+ "range": [
+ 60,
+ 63
+ ],
+ "name": "msg"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 66,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 17
+ },
+ "end": {
+ "line": 6,
+ "column": 25
+ }
+ },
+ "range": [
+ 66,
+ 74
+ ],
+ "value": "Hello!",
+ "raw": "'Hello!'"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 34,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export01/parser-options.json b/test/fixtures/ast/multiple-scripts-with-export01/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export01/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-export01/requirements.json b/test/fixtures/ast/multiple-scripts-with-export01/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export01/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export01/source.vue b/test/fixtures/ast/multiple-scripts-with-export01/source.vue
new file mode 100644
index 00000000..ae0413c9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export01/source.vue
@@ -0,0 +1,7 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-export01/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-export01/token-ranges.json
new file mode 100644
index 00000000..c1a94ddf
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export01/token-ranges.json
@@ -0,0 +1,15 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export01/tree.json b/test/fixtures/ast/multiple-scripts-with-export01/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export01/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export02/ast.json b/test/fixtures/ast/multiple-scripts-with-export02/ast.json
new file mode 100644
index 00000000..cf673aae
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export02/ast.json
@@ -0,0 +1,2525 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 262,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 18,
+ "column": 12
+ }
+ },
+ "range": [
+ 9,
+ 261
+ ],
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 9,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 9,
+ 22
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 13,
+ 22
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 13,
+ 18
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 21,
+ 22
+ ],
+ "value": 0,
+ "raw": "0"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 49,
+ "end": 66,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 17
+ }
+ },
+ "range": [
+ 49,
+ 66
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 56,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 8
+ }
+ },
+ "range": [
+ 56,
+ 57
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 56,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 8
+ }
+ },
+ "range": [
+ 56,
+ 57
+ ],
+ "name": "A"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 63,
+ "end": 66,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 14
+ },
+ "end": {
+ "line": 6,
+ "column": 17
+ }
+ },
+ "range": [
+ 63,
+ 66
+ ],
+ "value": "a",
+ "raw": "'a'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 67,
+ "end": 79,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "range": [
+ 67,
+ 79
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 73,
+ "end": 79,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 6
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "range": [
+ 73,
+ 79
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 73,
+ "end": 74,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 6
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "range": [
+ 73,
+ 74
+ ],
+ "name": "a"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 77,
+ "end": 79,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "range": [
+ 77,
+ 79
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 80,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 25
+ }
+ },
+ "range": [
+ 80,
+ 105
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 87,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 25
+ }
+ },
+ "range": [
+ 87,
+ 105
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 91,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 11
+ },
+ "end": {
+ "line": 8,
+ "column": 25
+ }
+ },
+ "range": [
+ 91,
+ 105
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 91,
+ "end": 94,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 11
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "range": [
+ 91,
+ 94
+ ],
+ "name": "msg"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 97,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 17
+ },
+ "end": {
+ "line": 8,
+ "column": 25
+ }
+ },
+ "range": [
+ 97,
+ 105
+ ],
+ "value": "Hello!",
+ "raw": "'Hello!'"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 106,
+ "end": 123,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 17
+ }
+ },
+ "range": [
+ 106,
+ 123
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 113,
+ "end": 114,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 7
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "range": [
+ 113,
+ 114
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 113,
+ "end": 114,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 7
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "range": [
+ 113,
+ 114
+ ],
+ "name": "B"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 120,
+ "end": 123,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 17
+ }
+ },
+ "range": [
+ 120,
+ 123
+ ],
+ "value": "a",
+ "raw": "'a'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 124,
+ "end": 136,
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 12
+ }
+ },
+ "range": [
+ 124,
+ 136
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 130,
+ "end": 136,
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 6
+ },
+ "end": {
+ "line": 10,
+ "column": 12
+ }
+ },
+ "range": [
+ 130,
+ 136
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 130,
+ "end": 131,
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 6
+ },
+ "end": {
+ "line": 10,
+ "column": 7
+ }
+ },
+ "range": [
+ 130,
+ 131
+ ],
+ "name": "b"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 134,
+ "end": 136,
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 10
+ },
+ "end": {
+ "line": 10,
+ "column": 12
+ }
+ },
+ "range": [
+ 134,
+ 136
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExportAllDeclaration",
+ "start": 137,
+ "end": 156,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 0
+ },
+ "end": {
+ "line": 11,
+ "column": 19
+ }
+ },
+ "range": [
+ 137,
+ 156
+ ],
+ "exported": null,
+ "source": {
+ "type": "Literal",
+ "start": 151,
+ "end": 156,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 14
+ },
+ "end": {
+ "line": 11,
+ "column": 19
+ }
+ },
+ "range": [
+ 151,
+ 156
+ ],
+ "value": "foo",
+ "raw": "'foo'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 157,
+ "end": 169,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 12
+ }
+ },
+ "range": [
+ 157,
+ 169
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 163,
+ "end": 169,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 6
+ },
+ "end": {
+ "line": 12,
+ "column": 12
+ }
+ },
+ "range": [
+ 163,
+ 169
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 163,
+ "end": 164,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 6
+ },
+ "end": {
+ "line": 12,
+ "column": 7
+ }
+ },
+ "range": [
+ 163,
+ 164
+ ],
+ "name": "c"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 167,
+ "end": 169,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 10
+ },
+ "end": {
+ "line": 12,
+ "column": 12
+ }
+ },
+ "range": [
+ 167,
+ 169
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExportDefaultDeclaration",
+ "start": 170,
+ "end": 187,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 0
+ },
+ "end": {
+ "line": 13,
+ "column": 17
+ }
+ },
+ "range": [
+ 170,
+ 187
+ ],
+ "declaration": {
+ "type": "ObjectExpression",
+ "start": 185,
+ "end": 187,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 15
+ },
+ "end": {
+ "line": 13,
+ "column": 17
+ }
+ },
+ "range": [
+ 185,
+ 187
+ ],
+ "properties": []
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 188,
+ "end": 200,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 0
+ },
+ "end": {
+ "line": 14,
+ "column": 12
+ }
+ },
+ "range": [
+ 188,
+ 200
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 194,
+ "end": 200,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 6
+ },
+ "end": {
+ "line": 14,
+ "column": 12
+ }
+ },
+ "range": [
+ 194,
+ 200
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 194,
+ "end": 195,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 6
+ },
+ "end": {
+ "line": 14,
+ "column": 7
+ }
+ },
+ "range": [
+ 194,
+ 195
+ ],
+ "name": "d"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 198,
+ "end": 200,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 10
+ },
+ "end": {
+ "line": 14,
+ "column": 12
+ }
+ },
+ "range": [
+ 198,
+ 200
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 201,
+ "end": 213,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 12
+ }
+ },
+ "range": [
+ 201,
+ 213
+ ],
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 209,
+ "end": 210,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 8
+ },
+ "end": {
+ "line": 15,
+ "column": 9
+ }
+ },
+ "range": [
+ 209,
+ 210
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 209,
+ "end": 210,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 8
+ },
+ "end": {
+ "line": 15,
+ "column": 9
+ }
+ },
+ "range": [
+ 209,
+ 210
+ ],
+ "name": "b"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 209,
+ "end": 210,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 8
+ },
+ "end": {
+ "line": 15,
+ "column": 9
+ }
+ },
+ "range": [
+ 209,
+ 210
+ ],
+ "name": "b"
+ }
+ },
+ {
+ "type": "ExportSpecifier",
+ "start": 211,
+ "end": 212,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 10
+ },
+ "end": {
+ "line": 15,
+ "column": 11
+ }
+ },
+ "range": [
+ 211,
+ 212
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 211,
+ "end": 212,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 10
+ },
+ "end": {
+ "line": 15,
+ "column": 11
+ }
+ },
+ "range": [
+ 211,
+ 212
+ ],
+ "name": "c"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 211,
+ "end": 212,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 10
+ },
+ "end": {
+ "line": 15,
+ "column": 11
+ }
+ },
+ "range": [
+ 211,
+ 212
+ ],
+ "name": "c"
+ }
+ }
+ ],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 214,
+ "end": 238,
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 24
+ }
+ },
+ "range": [
+ 214,
+ 238
+ ],
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 222,
+ "end": 229,
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 8
+ },
+ "end": {
+ "line": 16,
+ "column": 15
+ }
+ },
+ "range": [
+ 222,
+ 229
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 222,
+ "end": 223,
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 8
+ },
+ "end": {
+ "line": 16,
+ "column": 9
+ }
+ },
+ "range": [
+ 222,
+ 223
+ ],
+ "name": "b"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 227,
+ "end": 229,
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 13
+ },
+ "end": {
+ "line": 16,
+ "column": 15
+ }
+ },
+ "range": [
+ 227,
+ 229
+ ],
+ "name": "b2"
+ }
+ },
+ {
+ "type": "ExportSpecifier",
+ "start": 230,
+ "end": 237,
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 16
+ },
+ "end": {
+ "line": 16,
+ "column": 23
+ }
+ },
+ "range": [
+ 230,
+ 237
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 230,
+ "end": 231,
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 16
+ },
+ "end": {
+ "line": 16,
+ "column": 17
+ }
+ },
+ "range": [
+ 230,
+ 231
+ ],
+ "name": "c"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 235,
+ "end": 237,
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 21
+ },
+ "end": {
+ "line": 16,
+ "column": 23
+ }
+ },
+ "range": [
+ 235,
+ 237
+ ],
+ "name": "c2"
+ }
+ }
+ ],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 239,
+ "end": 248,
+ "loc": {
+ "start": {
+ "line": 17,
+ "column": 0
+ },
+ "end": {
+ "line": 17,
+ "column": 9
+ }
+ },
+ "range": [
+ 239,
+ 248
+ ],
+ "declaration": null,
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 249,
+ "end": 261,
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 0
+ },
+ "end": {
+ "line": 18,
+ "column": 12
+ }
+ },
+ "range": [
+ 249,
+ 261
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 255,
+ "end": 261,
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 6
+ },
+ "end": {
+ "line": 18,
+ "column": 12
+ }
+ },
+ "range": [
+ 255,
+ 261
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 255,
+ "end": 256,
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 6
+ },
+ "end": {
+ "line": 18,
+ "column": 7
+ }
+ },
+ "range": [
+ 255,
+ 256
+ ],
+ "name": "e"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 259,
+ "end": 261,
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 10
+ },
+ "end": {
+ "line": 18,
+ "column": 12
+ }
+ },
+ "range": [
+ 259,
+ 261
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 34,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export02/parser-options.json b/test/fixtures/ast/multiple-scripts-with-export02/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export02/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-export02/requirements.json b/test/fixtures/ast/multiple-scripts-with-export02/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export02/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export02/source.vue b/test/fixtures/ast/multiple-scripts-with-export02/source.vue
new file mode 100644
index 00000000..67210d80
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export02/source.vue
@@ -0,0 +1,19 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-export02/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-export02/token-ranges.json
new file mode 100644
index 00000000..b5d9365b
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export02/token-ranges.json
@@ -0,0 +1,70 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export02/tree.json b/test/fixtures/ast/multiple-scripts-with-export02/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export02/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export03/ast.json b/test/fixtures/ast/multiple-scripts-with-export03/ast.json
new file mode 100644
index 00000000..fff01a7e
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export03/ast.json
@@ -0,0 +1,2060 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 241,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 12
+ }
+ },
+ "range": [
+ 9,
+ 240
+ ],
+ "body": [
+ {
+ "type": "VariableDeclaration",
+ "start": 9,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 9,
+ 22
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 13,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 13,
+ 22
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 13,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 13,
+ 18
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 21,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "range": [
+ 21,
+ 22
+ ],
+ "value": 0,
+ "raw": "0"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 49,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 12
+ }
+ },
+ "range": [
+ 49,
+ 61
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 55,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 12
+ }
+ },
+ "range": [
+ 55,
+ 61
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 55,
+ "end": 56,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 7
+ }
+ },
+ "range": [
+ 55,
+ 56
+ ],
+ "name": "a"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 59,
+ "end": 61,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 10
+ },
+ "end": {
+ "line": 6,
+ "column": 12
+ }
+ },
+ "range": [
+ 59,
+ 61
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 62,
+ "end": 81,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 19
+ }
+ },
+ "range": [
+ 62,
+ 81
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 69,
+ "end": 70,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 7
+ },
+ "end": {
+ "line": 7,
+ "column": 8
+ }
+ },
+ "range": [
+ 69,
+ 70
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 69,
+ "end": 70,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 7
+ },
+ "end": {
+ "line": 7,
+ "column": 8
+ }
+ },
+ "range": [
+ 69,
+ 70
+ ],
+ "name": "A"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 76,
+ "end": 81,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 7,
+ "column": 19
+ }
+ },
+ "range": [
+ 76,
+ 81
+ ],
+ "value": "foo",
+ "raw": "'foo'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "ExportAllDeclaration",
+ "start": 82,
+ "end": 107,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 25
+ }
+ },
+ "range": [
+ 82,
+ 107
+ ],
+ "exported": {
+ "type": "Identifier",
+ "start": 94,
+ "end": 96,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "range": [
+ 94,
+ 96
+ ],
+ "name": "ns"
+ },
+ "source": {
+ "type": "Literal",
+ "start": 102,
+ "end": 107,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 20
+ },
+ "end": {
+ "line": 8,
+ "column": 25
+ }
+ },
+ "range": [
+ 102,
+ 107
+ ],
+ "value": "foo",
+ "raw": "'foo'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 108,
+ "end": 127,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 19
+ }
+ },
+ "range": [
+ 108,
+ 127
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 115,
+ "end": 116,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 7
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "range": [
+ 115,
+ 116
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 115,
+ "end": 116,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 7
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "range": [
+ 115,
+ 116
+ ],
+ "name": "B"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 122,
+ "end": 127,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 19
+ }
+ },
+ "range": [
+ 122,
+ 127
+ ],
+ "value": "foo",
+ "raw": "'foo'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 128,
+ "end": 140,
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 12
+ }
+ },
+ "range": [
+ 128,
+ 140
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 134,
+ "end": 140,
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 6
+ },
+ "end": {
+ "line": 10,
+ "column": 12
+ }
+ },
+ "range": [
+ 134,
+ 140
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 134,
+ "end": 135,
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 6
+ },
+ "end": {
+ "line": 10,
+ "column": 7
+ }
+ },
+ "range": [
+ 134,
+ 135
+ ],
+ "name": "b"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 138,
+ "end": 140,
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 10
+ },
+ "end": {
+ "line": 10,
+ "column": 12
+ }
+ },
+ "range": [
+ 138,
+ 140
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 141,
+ "end": 164,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 0
+ },
+ "end": {
+ "line": 11,
+ "column": 23
+ }
+ },
+ "range": [
+ 141,
+ 164
+ ],
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 149,
+ "end": 152,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 8
+ },
+ "end": {
+ "line": 11,
+ "column": 11
+ }
+ },
+ "range": [
+ 149,
+ 152
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 149,
+ "end": 152,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 8
+ },
+ "end": {
+ "line": 11,
+ "column": 11
+ }
+ },
+ "range": [
+ 149,
+ 152
+ ],
+ "name": "ns2"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 149,
+ "end": 152,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 8
+ },
+ "end": {
+ "line": 11,
+ "column": 11
+ }
+ },
+ "range": [
+ 149,
+ 152
+ ],
+ "name": "ns2"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 159,
+ "end": 164,
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 18
+ },
+ "end": {
+ "line": 11,
+ "column": 23
+ }
+ },
+ "range": [
+ 159,
+ 164
+ ],
+ "value": "foo",
+ "raw": "'foo'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 165,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 12
+ }
+ },
+ "range": [
+ 165,
+ 177
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 171,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 6
+ },
+ "end": {
+ "line": 12,
+ "column": 12
+ }
+ },
+ "range": [
+ 171,
+ 177
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 171,
+ "end": 172,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 6
+ },
+ "end": {
+ "line": 12,
+ "column": 7
+ }
+ },
+ "range": [
+ 171,
+ 172
+ ],
+ "name": "c"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 175,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 10
+ },
+ "end": {
+ "line": 12,
+ "column": 12
+ }
+ },
+ "range": [
+ 175,
+ 177
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 178,
+ "end": 197,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 0
+ },
+ "end": {
+ "line": 13,
+ "column": 19
+ }
+ },
+ "range": [
+ 178,
+ 197
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 185,
+ "end": 186,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 7
+ },
+ "end": {
+ "line": 13,
+ "column": 8
+ }
+ },
+ "range": [
+ 185,
+ 186
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 185,
+ "end": 186,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 7
+ },
+ "end": {
+ "line": 13,
+ "column": 8
+ }
+ },
+ "range": [
+ 185,
+ 186
+ ],
+ "name": "C"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 192,
+ "end": 197,
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 14
+ },
+ "end": {
+ "line": 13,
+ "column": 19
+ }
+ },
+ "range": [
+ 192,
+ 197
+ ],
+ "value": "foo",
+ "raw": "'foo'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 198,
+ "end": 227,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 0
+ },
+ "end": {
+ "line": 14,
+ "column": 29
+ }
+ },
+ "range": [
+ 198,
+ 227
+ ],
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 206,
+ "end": 215,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 8
+ },
+ "end": {
+ "line": 14,
+ "column": 17
+ }
+ },
+ "range": [
+ 206,
+ 215
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 206,
+ "end": 208,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 8
+ },
+ "end": {
+ "line": 14,
+ "column": 10
+ }
+ },
+ "range": [
+ 206,
+ 208
+ ],
+ "name": "ns"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 212,
+ "end": 215,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 14
+ },
+ "end": {
+ "line": 14,
+ "column": 17
+ }
+ },
+ "range": [
+ 212,
+ 215
+ ],
+ "name": "ns3"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 222,
+ "end": 227,
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 24
+ },
+ "end": {
+ "line": 14,
+ "column": 29
+ }
+ },
+ "range": [
+ 222,
+ 227
+ ],
+ "value": "foo",
+ "raw": "'foo'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 228,
+ "end": 240,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 12
+ }
+ },
+ "range": [
+ 228,
+ 240
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 234,
+ "end": 240,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 6
+ },
+ "end": {
+ "line": 15,
+ "column": 12
+ }
+ },
+ "range": [
+ 234,
+ 240
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 234,
+ "end": 235,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 6
+ },
+ "end": {
+ "line": 15,
+ "column": 7
+ }
+ },
+ "range": [
+ 234,
+ 235
+ ],
+ "name": "d"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 238,
+ "end": 240,
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 10
+ },
+ "end": {
+ "line": 15,
+ "column": 12
+ }
+ },
+ "range": [
+ 238,
+ 240
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "const"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 34,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export03/parser-options.json b/test/fixtures/ast/multiple-scripts-with-export03/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export03/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-export03/requirements.json b/test/fixtures/ast/multiple-scripts-with-export03/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export03/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export03/source.vue b/test/fixtures/ast/multiple-scripts-with-export03/source.vue
new file mode 100644
index 00000000..c1b579c6
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export03/source.vue
@@ -0,0 +1,16 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-export03/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-export03/token-ranges.json
new file mode 100644
index 00000000..fc1ab24d
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export03/token-ranges.json
@@ -0,0 +1,58 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export03/tree.json b/test/fixtures/ast/multiple-scripts-with-export03/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export03/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export04/ast.json b/test/fixtures/ast/multiple-scripts-with-export04/ast.json
new file mode 100644
index 00000000..cfbba14f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export04/ast.json
@@ -0,0 +1,1196 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 178,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 22
+ }
+ },
+ "range": [
+ 9,
+ 177
+ ],
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 9,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 9,
+ 30
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 16,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 16,
+ 30
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 20,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 20,
+ 30
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "range": [
+ 20,
+ 25
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 28,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 28,
+ 30
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 31,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "range": [
+ 31,
+ 53
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 38,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "range": [
+ 38,
+ 53
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 42,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "range": [
+ 42,
+ 53
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 42,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 17
+ }
+ },
+ "range": [
+ 42,
+ 48
+ ],
+ "name": "count2"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 51,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 20
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "range": [
+ 51,
+ 53
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "ImportDeclaration",
+ "start": 79,
+ "end": 124,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 45
+ }
+ },
+ "range": [
+ 79,
+ 124
+ ],
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "start": 86,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ },
+ "range": [
+ 86,
+ 98
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 86,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ },
+ "range": [
+ 86,
+ 98
+ ],
+ "name": "MyComponent1"
+ }
+ }
+ ],
+ "source": {
+ "type": "Literal",
+ "start": 104,
+ "end": 124,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 25
+ },
+ "end": {
+ "line": 6,
+ "column": 45
+ }
+ },
+ "range": [
+ 104,
+ 124
+ ],
+ "value": "./MyComponent1.vue",
+ "raw": "'./MyComponent1.vue'"
+ },
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 125,
+ "end": 139,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "range": [
+ 125,
+ 139
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 129,
+ "end": 139,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "range": [
+ 129,
+ 139
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 129,
+ "end": 134,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ },
+ "range": [
+ 129,
+ 134
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 137,
+ "end": 139,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 12
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "range": [
+ 137,
+ 139
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 140,
+ "end": 154,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "range": [
+ 140,
+ 154
+ ],
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 148,
+ "end": 153,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "range": [
+ 148,
+ 153
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 148,
+ "end": 153,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "range": [
+ 148,
+ 153
+ ],
+ "name": "count"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 148,
+ "end": 153,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "range": [
+ 148,
+ 153
+ ],
+ "name": "count"
+ }
+ }
+ ],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 155,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 22
+ }
+ },
+ "range": [
+ 155,
+ 177
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 162,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 7
+ },
+ "end": {
+ "line": 9,
+ "column": 22
+ }
+ },
+ "range": [
+ 162,
+ 177
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 166,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 9,
+ "column": 22
+ }
+ },
+ "range": [
+ 166,
+ 177
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 166,
+ "end": 172,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 9,
+ "column": 17
+ }
+ },
+ "range": [
+ 166,
+ 172
+ ],
+ "name": "count2"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 175,
+ "end": 177,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 20
+ },
+ "end": {
+ "line": 9,
+ "column": 22
+ }
+ },
+ "range": [
+ 175,
+ 177
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 64,
+ 78
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export04/parser-options.json b/test/fixtures/ast/multiple-scripts-with-export04/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export04/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-export04/requirements.json b/test/fixtures/ast/multiple-scripts-with-export04/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export04/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export04/source.vue b/test/fixtures/ast/multiple-scripts-with-export04/source.vue
new file mode 100644
index 00000000..188597dc
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export04/source.vue
@@ -0,0 +1,10 @@
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-export04/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-export04/token-ranges.json
new file mode 100644
index 00000000..bfab1925
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export04/token-ranges.json
@@ -0,0 +1,33 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export04/tree.json b/test/fixtures/ast/multiple-scripts-with-export04/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export04/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export05/ast.json b/test/fixtures/ast/multiple-scripts-with-export05/ast.json
new file mode 100644
index 00000000..6fa01d70
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export05/ast.json
@@ -0,0 +1,1070 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 151,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 23
+ }
+ },
+ "range": [
+ 9,
+ 150
+ ],
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 9,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 9,
+ 30
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 16,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 16,
+ 30
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 20,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 20,
+ 30
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 20,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "range": [
+ 20,
+ 25
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 28,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 28,
+ 30
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ "specifiers": [],
+ "source": null
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 31,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 27
+ }
+ },
+ "range": [
+ 31,
+ 58
+ ],
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 39,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 26
+ }
+ },
+ "range": [
+ 39,
+ 57
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 39,
+ "end": 44,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 39,
+ 44
+ ],
+ "name": "count"
+ },
+ "exported": {
+ "type": "Literal",
+ "start": 48,
+ "end": 57,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 26
+ }
+ },
+ "range": [
+ 48,
+ 57
+ ],
+ "value": "foo-bar",
+ "raw": "\"foo-bar\""
+ }
+ }
+ ],
+ "source": null
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 84,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 14
+ }
+ },
+ "range": [
+ 84,
+ 98
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 88,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 14
+ }
+ },
+ "range": [
+ 88,
+ 98
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 88,
+ "end": 93,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 9
+ }
+ },
+ "range": [
+ 88,
+ 93
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 96,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 12
+ },
+ "end": {
+ "line": 6,
+ "column": 14
+ }
+ },
+ "range": [
+ 96,
+ 98
+ ],
+ "value": 42,
+ "raw": "42"
+ }
+ }
+ ],
+ "kind": "let"
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 99,
+ "end": 126,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 27
+ }
+ },
+ "range": [
+ 99,
+ 126
+ ],
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 107,
+ "end": 125,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 26
+ }
+ },
+ "range": [
+ 107,
+ 125
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 107,
+ "end": 112,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "range": [
+ 107,
+ 112
+ ],
+ "name": "count"
+ },
+ "exported": {
+ "type": "Literal",
+ "start": 116,
+ "end": 125,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 17
+ },
+ "end": {
+ "line": 7,
+ "column": 26
+ }
+ },
+ "range": [
+ 116,
+ 125
+ ],
+ "value": "foo-bar",
+ "raw": "\"foo-bar\""
+ }
+ }
+ ],
+ "source": null
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 127,
+ "end": 150,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 23
+ }
+ },
+ "range": [
+ 127,
+ 150
+ ],
+ "declaration": null,
+ "specifiers": [
+ {
+ "type": "ExportSpecifier",
+ "start": 135,
+ "end": 149,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 22
+ }
+ },
+ "range": [
+ 135,
+ 149
+ ],
+ "local": {
+ "type": "Identifier",
+ "start": 135,
+ "end": 140,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "range": [
+ 135,
+ 140
+ ],
+ "name": "count"
+ },
+ "exported": {
+ "type": "Identifier",
+ "start": 144,
+ "end": 149,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 17
+ },
+ "end": {
+ "line": 8,
+ "column": 22
+ }
+ },
+ "range": [
+ 144,
+ 149
+ ],
+ "name": "count"
+ }
+ }
+ ],
+ "source": null
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 69,
+ 83
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export05/parser-options.json b/test/fixtures/ast/multiple-scripts-with-export05/parser-options.json
new file mode 100644
index 00000000..9f047d2c
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export05/parser-options.json
@@ -0,0 +1,4 @@
+{
+ "sourceType": "module",
+ "ecmaVersion": 2022
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-export05/requirements.json b/test/fixtures/ast/multiple-scripts-with-export05/requirements.json
new file mode 100644
index 00000000..afdd18ef
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export05/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8.7"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export05/source.vue b/test/fixtures/ast/multiple-scripts-with-export05/source.vue
new file mode 100644
index 00000000..f848b252
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export05/source.vue
@@ -0,0 +1,9 @@
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-export05/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-export05/token-ranges.json
new file mode 100644
index 00000000..2a9e6963
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export05/token-ranges.json
@@ -0,0 +1,33 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-export05/tree.json b/test/fixtures/ast/multiple-scripts-with-export05/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-export05/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-2/ast.json b/test/fixtures/ast/multiple-scripts-with-ts-2/ast.json
new file mode 100644
index 00000000..f9931353
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-2/ast.json
@@ -0,0 +1,806 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "ImportDeclaration",
+ "source": {
+ "type": "Literal",
+ "value": "./a",
+ "raw": "'./a'",
+ "range": [
+ 23,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 14
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "local": {
+ "type": "Identifier",
+ "name": "A",
+ "range": [
+ 16,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 16,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ }
+ }
+ ],
+ "importKind": "value",
+ "range": [
+ 9,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ }
+ },
+ {
+ "type": "ImportDeclaration",
+ "source": {
+ "type": "Literal",
+ "value": "./a",
+ "raw": "'./a'",
+ "range": [
+ 69,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 14
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "local": {
+ "type": "Identifier",
+ "name": "B",
+ "range": [
+ 62,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 62,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 8
+ }
+ }
+ }
+ ],
+ "importKind": "value",
+ "range": [
+ 55,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "c",
+ "range": [
+ 81,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 6
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ }
+ },
+ "init": {
+ "type": "Literal",
+ "value": 42,
+ "raw": "42",
+ "range": [
+ 85,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ }
+ },
+ "range": [
+ 81,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 6
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ }
+ }
+ ],
+ "kind": "const",
+ "range": [
+ 75,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "d",
+ "range": [
+ 94,
+ 95
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ }
+ },
+ "init": {
+ "type": "CallExpression",
+ "callee": {
+ "type": "MemberExpression",
+ "object": {
+ "type": "Identifier",
+ "name": "A",
+ "range": [
+ 98,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 11
+ }
+ }
+ },
+ "property": {
+ "type": "Identifier",
+ "name": "use",
+ "range": [
+ 100,
+ 103
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 15
+ }
+ }
+ },
+ "computed": false,
+ "optional": false,
+ "range": [
+ 98,
+ 103
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 15
+ }
+ }
+ },
+ "arguments": [],
+ "optional": false,
+ "range": [
+ 98,
+ 105
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ }
+ },
+ "range": [
+ 94,
+ 105
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "kind": "const",
+ "range": [
+ 88,
+ 105
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "sourceType": "module",
+ "range": [
+ 9,
+ 105
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 40,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "comments": []
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-2/parser-options.json b/test/fixtures/ast/multiple-scripts-with-ts-2/parser-options.json
new file mode 100644
index 00000000..6e1a0ab4
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-2/parser-options.json
@@ -0,0 +1,4 @@
+{
+ "sourceType": "module",
+ "parser": "@typescript-eslint/parser"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-2/requirements.json b/test/fixtures/ast/multiple-scripts-with-ts-2/requirements.json
new file mode 100644
index 00000000..945cf775
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-2/requirements.json
@@ -0,0 +1,3 @@
+{
+ "@typescript-eslint/parser": "^4.0.0"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-2/source.vue b/test/fixtures/ast/multiple-scripts-with-ts-2/source.vue
new file mode 100644
index 00000000..c4c3f1e2
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-2/source.vue
@@ -0,0 +1,9 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-2/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-ts-2/token-ranges.json
new file mode 100644
index 00000000..0570d8ea
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-2/token-ranges.json
@@ -0,0 +1,26 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-2/tree.json b/test/fixtures/ast/multiple-scripts-with-ts-2/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-2/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-3/ast.json b/test/fixtures/ast/multiple-scripts-with-ts-3/ast.json
new file mode 100644
index 00000000..32b118ed
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-3/ast.json
@@ -0,0 +1,735 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "Literal",
+ "value": "script",
+ "raw": "\"script\"",
+ "range": [
+ 9,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 9,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "directive": "script"
+ },
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "Literal",
+ "value": "script setup",
+ "raw": "\"script setup\"",
+ "range": [
+ 76,
+ 90
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ }
+ },
+ "range": [
+ 76,
+ 90
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ }
+ }
+ ],
+ "sourceType": "module",
+ "range": [
+ 9,
+ 90
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 61,
+ 75
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "comments": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 29,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 29,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 39,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 19
+ }
+ },
+ "value": "Template!"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 48,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 8,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 9,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "value": "\"script\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 17,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 18,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 27,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 29,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 38,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 39,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 19
+ }
+ },
+ "value": "Template!"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 48,
+ 58
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 29
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 58,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 29
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 59,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 30
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 61,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 69,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 74,
+ 75
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 75,
+ 76
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 76,
+ 83
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": "\"script"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 83,
+ 84
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 84,
+ 90
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "value": "setup\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 90,
+ 91
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 91,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 99,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 100,
+ 101
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-3/parser-options.json b/test/fixtures/ast/multiple-scripts-with-ts-3/parser-options.json
new file mode 100644
index 00000000..6e1a0ab4
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-3/parser-options.json
@@ -0,0 +1,4 @@
+{
+ "sourceType": "module",
+ "parser": "@typescript-eslint/parser"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-3/requirements.json b/test/fixtures/ast/multiple-scripts-with-ts-3/requirements.json
new file mode 100644
index 00000000..945cf775
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-3/requirements.json
@@ -0,0 +1,3 @@
+{
+ "@typescript-eslint/parser": "^4.0.0"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-3/source.vue b/test/fixtures/ast/multiple-scripts-with-ts-3/source.vue
new file mode 100644
index 00000000..e136f806
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-3/source.vue
@@ -0,0 +1,9 @@
+
+
+
Template!
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-3/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-ts-3/token-ranges.json
new file mode 100644
index 00000000..91b6f7d5
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-3/token-ranges.json
@@ -0,0 +1,33 @@
+[
+ "",
+ "",
+ "",
+ "\n\n",
+ "
",
+ "Template!",
+ " ",
+ "\n\n",
+ "",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-3/tree.json b/test/fixtures/ast/multiple-scripts-with-ts-3/tree.json
new file mode 100644
index 00000000..7cedc5f9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-3/tree.json
@@ -0,0 +1,23 @@
+[
+ {
+ "type": "VElement",
+ "text": "
Template! ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "Template!",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-4/ast.json b/test/fixtures/ast/multiple-scripts-with-ts-4/ast.json
new file mode 100644
index 00000000..ad815425
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-4/ast.json
@@ -0,0 +1,843 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "Literal",
+ "value": "script",
+ "raw": "\"script\"",
+ "range": [
+ 9,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ }
+ },
+ "range": [
+ 9,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "directive": "script"
+ }
+ ],
+ "sourceType": "module",
+ "range": [
+ 9,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ }
+ ],
+ "comments": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 29,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 29,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 39,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 19
+ }
+ },
+ "value": "Template!"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 48,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 8,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 9,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "value": "\"script\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 17,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 18,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 27,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 29,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 38,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 39,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 19
+ }
+ },
+ "value": "Template!"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 48,
+ 58
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 19
+ },
+ "end": {
+ "line": 5,
+ "column": 29
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 58,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 29
+ },
+ "end": {
+ "line": 5,
+ "column": 30
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 59,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 30
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 61,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 69,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 74,
+ 75
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 75,
+ 76
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 76,
+ 83
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": "\"script"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 83,
+ 84
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 84,
+ 90
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "value": "setup\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 90,
+ 91
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 91,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 99,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 100,
+ 102
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 11,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 102,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 0
+ },
+ "end": {
+ "line": 11,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 110,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 8
+ },
+ "end": {
+ "line": 11,
+ "column": 15
+ }
+ },
+ "value": "unknown"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 117,
+ 118
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 15
+ },
+ "end": {
+ "line": 11,
+ "column": 16
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 118,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 16
+ },
+ "end": {
+ "line": 12,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 119,
+ 126
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 7
+ }
+ },
+ "value": "\"script"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 126,
+ 127
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 7
+ },
+ "end": {
+ "line": 12,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 127,
+ 135
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 8
+ },
+ "end": {
+ "line": 12,
+ "column": 16
+ }
+ },
+ "value": "unknown\""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 135,
+ 136
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 16
+ },
+ "end": {
+ "line": 13,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 136,
+ 144
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 0
+ },
+ "end": {
+ "line": 13,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 144,
+ 145
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 8
+ },
+ "end": {
+ "line": 13,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 145,
+ 146
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 9
+ },
+ "end": {
+ "line": 14,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-4/parser-options.json b/test/fixtures/ast/multiple-scripts-with-ts-4/parser-options.json
new file mode 100644
index 00000000..6e1a0ab4
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-4/parser-options.json
@@ -0,0 +1,4 @@
+{
+ "sourceType": "module",
+ "parser": "@typescript-eslint/parser"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-4/requirements.json b/test/fixtures/ast/multiple-scripts-with-ts-4/requirements.json
new file mode 100644
index 00000000..945cf775
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-4/requirements.json
@@ -0,0 +1,3 @@
+{
+ "@typescript-eslint/parser": "^4.0.0"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-4/source.vue b/test/fixtures/ast/multiple-scripts-with-ts-4/source.vue
new file mode 100644
index 00000000..7d1a37de
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-4/source.vue
@@ -0,0 +1,13 @@
+
+
+
Template!
+
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-4/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-ts-4/token-ranges.json
new file mode 100644
index 00000000..002d3fc9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-4/token-ranges.json
@@ -0,0 +1,41 @@
+[
+ "",
+ "",
+ "\n\n",
+ "
",
+ "Template!",
+ " ",
+ "\n\n",
+ "",
+ "\n\n",
+ "",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-4/tree.json b/test/fixtures/ast/multiple-scripts-with-ts-4/tree.json
new file mode 100644
index 00000000..7cedc5f9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-4/tree.json
@@ -0,0 +1,23 @@
+[
+ {
+ "type": "VElement",
+ "text": "
Template! ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "Template!",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-5/ast.json b/test/fixtures/ast/multiple-scripts-with-ts-5/ast.json
new file mode 100644
index 00000000..edd413d0
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-5/ast.json
@@ -0,0 +1,1669 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "declaration": {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "count",
+ "range": [
+ 20,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": {
+ "type": "Literal",
+ "value": 42,
+ "raw": "42",
+ "range": [
+ 28,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 20,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 16,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "exportKind": "value",
+ "range": [
+ 9,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ {
+ "type": "ImportDeclaration",
+ "source": {
+ "type": "Literal",
+ "value": "./Foo.vue",
+ "raw": "'./Foo.vue'",
+ "range": [
+ 118,
+ 129
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 16
+ },
+ "end": {
+ "line": 8,
+ "column": 27
+ }
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "local": {
+ "type": "Identifier",
+ "name": "Foo",
+ "range": [
+ 109,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 109,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 10
+ }
+ }
+ }
+ ],
+ "importKind": "value",
+ "range": [
+ 102,
+ 129
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 27
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "count",
+ "range": [
+ 134,
+ 139
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ }
+ },
+ "init": {
+ "type": "Literal",
+ "value": 42,
+ "raw": "42",
+ "range": [
+ 142,
+ 144
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ }
+ },
+ "range": [
+ 134,
+ 144
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 130,
+ 144
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ }
+ }
+ ],
+ "sourceType": "module",
+ "range": [
+ 9,
+ 144
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ },
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 87,
+ 101
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "comments": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 42,
+ 85
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 43
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 42,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VElement",
+ "range": [
+ 52,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 32
+ }
+ },
+ "name": "foo",
+ "rawName": "Foo",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 52,
+ 57
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 15
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 57,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 15
+ },
+ "end": {
+ "line": 5,
+ "column": 26
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "name": "count",
+ "range": [
+ 60,
+ 65
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 23
+ }
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "name": "count",
+ "range": [
+ 60,
+ 65
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 23
+ }
+ }
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 68,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 26
+ },
+ "end": {
+ "line": 5,
+ "column": 32
+ }
+ }
+ },
+ "variables": []
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 74,
+ 85
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 32
+ },
+ "end": {
+ "line": 5,
+ "column": 43
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 8,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 9,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "export"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 15,
+ 16
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 16,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 19,
+ 20
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 20,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 25,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 16
+ },
+ "end": {
+ "line": 2,
+ "column": 17
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 27,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 18
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 28,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "value": "42"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 31,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 39,
+ 40
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 40,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 42,
+ 51
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 51,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 52,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 56,
+ 57
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 14
+ },
+ "end": {
+ "line": 5,
+ "column": 15
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 57,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 15
+ },
+ "end": {
+ "line": 5,
+ "column": 17
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "count",
+ "range": [
+ 60,
+ 65
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 23
+ }
+ }
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 66,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 24
+ },
+ "end": {
+ "line": 5,
+ "column": 26
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 68,
+ 73
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 26
+ },
+ "end": {
+ "line": 5,
+ "column": 31
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 73,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 31
+ },
+ "end": {
+ "line": 5,
+ "column": 32
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 74,
+ 84
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 32
+ },
+ "end": {
+ "line": 5,
+ "column": 42
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 84,
+ 85
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 42
+ },
+ "end": {
+ "line": 5,
+ "column": 43
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 85,
+ 87
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 43
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 87,
+ 94
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 95,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 100,
+ 101
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 101,
+ 102
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 102,
+ 108
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 108,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 109,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 10
+ }
+ },
+ "value": "Foo"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 112,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 10
+ },
+ "end": {
+ "line": 8,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 113,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 11
+ },
+ "end": {
+ "line": 8,
+ "column": 15
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 117,
+ 118
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 15
+ },
+ "end": {
+ "line": 8,
+ "column": 16
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 118,
+ 129
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 16
+ },
+ "end": {
+ "line": 8,
+ "column": 27
+ }
+ },
+ "value": "'./Foo.vue'"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 129,
+ 130
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 27
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 130,
+ 133
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 3
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 133,
+ 134
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 3
+ },
+ "end": {
+ "line": 9,
+ "column": 4
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 134,
+ 139
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 139,
+ 140
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 9,
+ "column": 10
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 140,
+ 141
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 10
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 141,
+ 142
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 9,
+ "column": 12
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 142,
+ 144
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ },
+ "value": "42"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 144,
+ 145
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 14
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 145,
+ 153
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 153,
+ 154
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 8
+ },
+ "end": {
+ "line": 10,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 154,
+ 155
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 9
+ },
+ "end": {
+ "line": 11,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-5/parser-options.json b/test/fixtures/ast/multiple-scripts-with-ts-5/parser-options.json
new file mode 100644
index 00000000..6e1a0ab4
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-5/parser-options.json
@@ -0,0 +1,4 @@
+{
+ "sourceType": "module",
+ "parser": "@typescript-eslint/parser"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-5/requirements.json b/test/fixtures/ast/multiple-scripts-with-ts-5/requirements.json
new file mode 100644
index 00000000..945cf775
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-5/requirements.json
@@ -0,0 +1,3 @@
+{
+ "@typescript-eslint/parser": "^4.0.0"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-5/source.vue b/test/fixtures/ast/multiple-scripts-with-ts-5/source.vue
new file mode 100644
index 00000000..267b0f65
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-5/source.vue
@@ -0,0 +1,10 @@
+
+
+
{{ count }}
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-5/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-ts-5/token-ranges.json
new file mode 100644
index 00000000..5da2f7d5
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-5/token-ranges.json
@@ -0,0 +1,70 @@
+[
+ "",
+ "",
+ "",
+ "\n\n",
+ "
",
+ "",
+ "{{",
+ "count",
+ "}}",
+ " ",
+ " ",
+ "\n\n",
+ "",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-5/tree.json b/test/fixtures/ast/multiple-scripts-with-ts-5/tree.json
new file mode 100644
index 00000000..f84d7918
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-5/tree.json
@@ -0,0 +1,45 @@
+[
+ {
+ "type": "VElement",
+ "text": "
{{ count }} ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "{{ count }} ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ count }}",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "count",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-7/ast.json b/test/fixtures/ast/multiple-scripts-with-ts-7/ast.json
new file mode 100644
index 00000000..f860e330
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-7/ast.json
@@ -0,0 +1,2585 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "declaration": {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "count",
+ "range": [
+ 20,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": {
+ "type": "Literal",
+ "value": 42,
+ "raw": "42",
+ "range": [
+ 28,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 20,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 16,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "exportKind": "value",
+ "range": [
+ 9,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ {
+ "type": "ImportDeclaration",
+ "source": {
+ "type": "Literal",
+ "value": "./MyComponent1.vue",
+ "raw": "'./MyComponent1.vue'",
+ "range": [
+ 82,
+ 102
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 25
+ },
+ "end": {
+ "line": 6,
+ "column": 45
+ }
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "local": {
+ "type": "Identifier",
+ "name": "MyComponent1",
+ "range": [
+ 64,
+ 76
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 64,
+ 76
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ }
+ ],
+ "importKind": "value",
+ "range": [
+ 57,
+ 102
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 45
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "count",
+ "range": [
+ 107,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ }
+ },
+ "init": {
+ "type": "Literal",
+ "value": 42,
+ "raw": "42",
+ "range": [
+ 115,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 12
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ }
+ },
+ "range": [
+ 107,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 103,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ }
+ },
+ {
+ "type": "ImportDeclaration",
+ "source": {
+ "type": "Literal",
+ "value": "./MyComponent2.vue",
+ "raw": "'./MyComponent2.vue'",
+ "range": [
+ 143,
+ 163
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 25
+ },
+ "end": {
+ "line": 8,
+ "column": 45
+ }
+ }
+ },
+ "specifiers": [
+ {
+ "type": "ImportDefaultSpecifier",
+ "local": {
+ "type": "Identifier",
+ "name": "MyComponent2",
+ "range": [
+ 125,
+ 137
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ }
+ },
+ "range": [
+ 125,
+ 137
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ }
+ }
+ ],
+ "importKind": "value",
+ "range": [
+ 118,
+ 163
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 45
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "a",
+ "range": [
+ 168,
+ 169
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ },
+ "init": {
+ "type": "BinaryExpression",
+ "operator": "+",
+ "left": {
+ "type": "Identifier",
+ "name": "b",
+ "range": [
+ 172,
+ 173
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ }
+ },
+ "right": {
+ "type": "Identifier",
+ "name": "c",
+ "range": [
+ 176,
+ 177
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 172,
+ 177
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "range": [
+ 168,
+ 177
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 164,
+ 177
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ }
+ ],
+ "sourceType": "module",
+ "range": [
+ 9,
+ 177
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 42,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "comments": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 189,
+ 276
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 189,
+ 199
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 199,
+ 204
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 10
+ },
+ "end": {
+ "line": 13,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 204,
+ 244
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 4
+ },
+ "end": {
+ "line": 13,
+ "column": 44
+ }
+ },
+ "name": "mycomponent1",
+ "rawName": "MyComponent1",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 204,
+ 218
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 4
+ },
+ "end": {
+ "line": 13,
+ "column": 18
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 218,
+ 229
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 18
+ },
+ "end": {
+ "line": 13,
+ "column": 29
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "name": "count",
+ "range": [
+ 221,
+ 226
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 21
+ },
+ "end": {
+ "line": 13,
+ "column": 26
+ }
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "name": "count",
+ "range": [
+ 221,
+ 226
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 21
+ },
+ "end": {
+ "line": 13,
+ "column": 26
+ }
+ }
+ },
+ "mode": "r"
+ }
+ ]
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 229,
+ 244
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 29
+ },
+ "end": {
+ "line": 13,
+ "column": 44
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 244,
+ 249
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 44
+ },
+ "end": {
+ "line": 14,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 249,
+ 264
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 4
+ },
+ "end": {
+ "line": 14,
+ "column": 19
+ }
+ },
+ "name": "mycomponent2",
+ "rawName": "MyComponent2",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 249,
+ 264
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 4
+ },
+ "end": {
+ "line": 14,
+ "column": 19
+ }
+ },
+ "selfClosing": true,
+ "attributes": []
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 264,
+ 265
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 19
+ },
+ "end": {
+ "line": 15,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 265,
+ 276
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 7,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 8,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 9,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "export"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 15,
+ 16
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 16,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 19,
+ 20
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 20,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 25,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 16
+ },
+ "end": {
+ "line": 2,
+ "column": 17
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 26,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 17
+ },
+ "end": {
+ "line": 2,
+ "column": 18
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 27,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 18
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 28,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "value": "42"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 31,
+ 39
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 39,
+ 40
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 40,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 42,
+ 49
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 50,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 13
+ }
+ },
+ "value": "setup"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 55,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 13
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 56,
+ 57
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 14
+ },
+ "end": {
+ "line": 6,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 57,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 63,
+ 64
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 64,
+ 76
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ },
+ "value": "MyComponent1"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 76,
+ 77
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 19
+ },
+ "end": {
+ "line": 6,
+ "column": 20
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 77,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 20
+ },
+ "end": {
+ "line": 6,
+ "column": 24
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 81,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 24
+ },
+ "end": {
+ "line": 6,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 82,
+ 102
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 25
+ },
+ "end": {
+ "line": 6,
+ "column": 45
+ }
+ },
+ "value": "'./MyComponent1.vue'"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 102,
+ 103
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 45
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 103,
+ 106
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 3
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 106,
+ 107
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 3
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 107,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ },
+ "value": "count"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 112,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 10
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 113,
+ 114
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 11
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 114,
+ 115
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 11
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 115,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 12
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": "42"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 117,
+ 118
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 118,
+ 124
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 6
+ }
+ },
+ "value": "import"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 124,
+ 125
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 125,
+ 137
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ },
+ "value": "MyComponent2"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 137,
+ 138
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 19
+ },
+ "end": {
+ "line": 8,
+ "column": 20
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 138,
+ 142
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 20
+ },
+ "end": {
+ "line": 8,
+ "column": 24
+ }
+ },
+ "value": "from"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 142,
+ 143
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 24
+ },
+ "end": {
+ "line": 8,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 143,
+ 163
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 25
+ },
+ "end": {
+ "line": 8,
+ "column": 45
+ }
+ },
+ "value": "'./MyComponent2.vue'"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 163,
+ 164
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 45
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 164,
+ 167
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 3
+ }
+ },
+ "value": "let"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 167,
+ 168
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 3
+ },
+ "end": {
+ "line": 9,
+ "column": 4
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 168,
+ 169
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ },
+ "value": "a"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 169,
+ 170
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 5
+ },
+ "end": {
+ "line": 9,
+ "column": 6
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 170,
+ 171
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 6
+ },
+ "end": {
+ "line": 9,
+ "column": 7
+ }
+ },
+ "value": "="
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 171,
+ 172
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 7
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 172,
+ 173
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ },
+ "value": "b"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 173,
+ 174
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 9
+ },
+ "end": {
+ "line": 9,
+ "column": 10
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 174,
+ 175
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 10
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "value": "+"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 175,
+ 176
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 9,
+ "column": 12
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 176,
+ 177
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "value": "c"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 177,
+ 178
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 13
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 178,
+ 186
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 186,
+ 187
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 8
+ },
+ "end": {
+ "line": 10,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 187,
+ 189
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 9
+ },
+ "end": {
+ "line": 12,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 189,
+ 198
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 198,
+ 199
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 9
+ },
+ "end": {
+ "line": 12,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 199,
+ 204
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 10
+ },
+ "end": {
+ "line": 13,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 204,
+ 217
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 4
+ },
+ "end": {
+ "line": 13,
+ "column": 17
+ }
+ },
+ "value": "mycomponent1"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 217,
+ 218
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 17
+ },
+ "end": {
+ "line": 13,
+ "column": 18
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 218,
+ 220
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 18
+ },
+ "end": {
+ "line": 13,
+ "column": 20
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "count",
+ "range": [
+ 221,
+ 226
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 21
+ },
+ "end": {
+ "line": 13,
+ "column": 26
+ }
+ }
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 227,
+ 229
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 27
+ },
+ "end": {
+ "line": 13,
+ "column": 29
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 229,
+ 243
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 29
+ },
+ "end": {
+ "line": 13,
+ "column": 43
+ }
+ },
+ "value": "mycomponent1"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 243,
+ 244
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 43
+ },
+ "end": {
+ "line": 13,
+ "column": 44
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 244,
+ 249
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 44
+ },
+ "end": {
+ "line": 14,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 249,
+ 262
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 4
+ },
+ "end": {
+ "line": 14,
+ "column": 17
+ }
+ },
+ "value": "mycomponent2"
+ },
+ {
+ "type": "HTMLSelfClosingTagClose",
+ "range": [
+ 262,
+ 264
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 17
+ },
+ "end": {
+ "line": 14,
+ "column": 19
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 264,
+ 265
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 19
+ },
+ "end": {
+ "line": 15,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 265,
+ 275
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 0
+ },
+ "end": {
+ "line": 15,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 275,
+ 276
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 10
+ },
+ "end": {
+ "line": 15,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 276,
+ 278
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 11
+ },
+ "end": {
+ "line": 17,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ }
+ ],
+ "comments": [],
+ "errors": [
+ {
+ "message": "non-void-html-element-start-tag-with-trailing-solidus",
+ "index": 249,
+ "lineNumber": 14,
+ "column": 4
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-7/parser-options.json b/test/fixtures/ast/multiple-scripts-with-ts-7/parser-options.json
new file mode 100644
index 00000000..6e1a0ab4
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-7/parser-options.json
@@ -0,0 +1,4 @@
+{
+ "sourceType": "module",
+ "parser": "@typescript-eslint/parser"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-7/requirements.json b/test/fixtures/ast/multiple-scripts-with-ts-7/requirements.json
new file mode 100644
index 00000000..945cf775
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-7/requirements.json
@@ -0,0 +1,3 @@
+{
+ "@typescript-eslint/parser": "^4.0.0"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-7/scope.json b/test/fixtures/ast/multiple-scripts-with-ts-7/scope.json
new file mode 100644
index 00000000..0e204975
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-7/scope.json
@@ -0,0 +1,1319 @@
+{
+ "type": "global",
+ "variables": [
+ {
+ "name": "Symbol",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "PropertyKey",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "PropertyDescriptor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "PropertyDescriptorMap",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Object",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ObjectConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Function",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "FunctionConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ThisParameterType",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "OmitThisParameter",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "CallableFunction",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "NewableFunction",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "IArguments",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "String",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "StringConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Boolean",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "BooleanConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Number",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "NumberConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "TemplateStringsArray",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ImportMeta",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Math",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Date",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "DateConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "RegExpMatchArray",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "RegExpExecArray",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "RegExp",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "RegExpConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Error",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ErrorConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "EvalError",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "EvalErrorConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "RangeError",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "RangeErrorConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ReferenceError",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ReferenceErrorConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "SyntaxError",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "SyntaxErrorConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "TypeError",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "TypeErrorConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "URIError",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "URIErrorConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "JSON",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ReadonlyArray",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ConcatArray",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Array",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "TypedPropertyDescriptor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ClassDecorator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "PropertyDecorator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "MethodDecorator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ParameterDecorator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "PromiseConstructorLike",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "PromiseLike",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Promise",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ArrayLike",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Partial",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Required",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Readonly",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Pick",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Record",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Exclude",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Extract",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Omit",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "NonNullable",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Parameters",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ConstructorParameters",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ReturnType",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "InstanceType",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uppercase",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Lowercase",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Capitalize",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uncapitalize",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ThisType",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ArrayBuffer",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ArrayBufferTypes",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ArrayBufferLike",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ArrayBufferConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ArrayBufferView",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "DataView",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "DataViewConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Int8Array",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Int8ArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uint8Array",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uint8ArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uint8ClampedArray",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uint8ClampedArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Int16Array",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Int16ArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uint16Array",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uint16ArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Int32Array",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Int32ArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uint32Array",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Uint32ArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Float32Array",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Float32ArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Float64Array",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Float64ArrayConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Intl",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Map",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "MapConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ReadonlyMap",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "WeakMap",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "WeakMapConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Set",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "SetConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ReadonlySet",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "WeakSet",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "WeakSetConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "SymbolConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "IteratorYieldResult",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "IteratorReturnResult",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "IteratorResult",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Iterator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Iterable",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "IterableIterator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "PromiseConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Generator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "GeneratorFunction",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "GeneratorFunctionConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ProxyHandler",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "ProxyConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Reflect",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "SharedArrayBuffer",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "SharedArrayBufferConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "Atomics",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "AsyncIterator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "AsyncIterable",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "AsyncIterableIterator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "AsyncGenerator",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "AsyncGeneratorFunction",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "AsyncGeneratorFunctionConstructor",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ },
+ {
+ "name": "const",
+ "identifiers": [],
+ "defs": [],
+ "references": []
+ }
+ ],
+ "references": [],
+ "childScopes": [
+ {
+ "type": "module",
+ "variables": [
+ {
+ "name": "count",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "Variable",
+ "node": {
+ "type": "VariableDeclarator",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ }
+ },
+ "name": "count"
+ },
+ {
+ "type": "Variable",
+ "node": {
+ "type": "VariableDeclarator",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ }
+ },
+ "name": "count"
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": true
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": true
+ }
+ ]
+ },
+ {
+ "name": "MyComponent1",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "MyComponent1",
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "ImportBinding",
+ "node": {
+ "type": "ImportDefaultSpecifier",
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 7
+ },
+ "end": {
+ "line": 6,
+ "column": 19
+ }
+ }
+ },
+ "name": "MyComponent1"
+ }
+ ],
+ "references": []
+ },
+ {
+ "name": "MyComponent2",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "MyComponent2",
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "ImportBinding",
+ "node": {
+ "type": "ImportDefaultSpecifier",
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ }
+ },
+ "name": "MyComponent2"
+ }
+ ],
+ "references": []
+ },
+ {
+ "name": "a",
+ "identifiers": [
+ {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ }
+ ],
+ "defs": [
+ {
+ "type": "Variable",
+ "node": {
+ "type": "VariableDeclarator",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "name": "a"
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ },
+ "init": true
+ }
+ ]
+ }
+ ],
+ "references": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": true
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "count",
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ }
+ },
+ "init": true
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ },
+ "from": "module",
+ "resolved": {
+ "type": "Identifier",
+ "name": "a",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 5
+ }
+ }
+ },
+ "init": true
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "b",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "c",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ }
+ ],
+ "childScopes": [],
+ "through": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "b",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "c",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ }
+ ]
+ }
+ ],
+ "through": [
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "b",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 9
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ },
+ {
+ "identifier": {
+ "type": "Identifier",
+ "name": "c",
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 12
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ }
+ },
+ "from": "module",
+ "resolved": null,
+ "init": null
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-7/source.vue b/test/fixtures/ast/multiple-scripts-with-ts-7/source.vue
new file mode 100644
index 00000000..3bd3b5d1
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-7/source.vue
@@ -0,0 +1,16 @@
+
+
+
+
+
+ {{ count }}
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-7/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-ts-7/token-ranges.json
new file mode 100644
index 00000000..acbbc20c
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-7/token-ranges.json
@@ -0,0 +1,105 @@
+[
+ "",
+ "",
+ "",
+ "\n\n",
+ "",
+ "\n\n",
+ "
",
+ "\n ",
+ "",
+ "{{",
+ "count",
+ "}}",
+ " ",
+ "\n ",
+ " ",
+ "\n",
+ " ",
+ "\n\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-7/tree.json b/test/fixtures/ast/multiple-scripts-with-ts-7/tree.json
new file mode 100644
index 00000000..b3d62709
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-7/tree.json
@@ -0,0 +1,71 @@
+[
+ {
+ "type": "VElement",
+ "text": "
\n {{ count }} \n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "{{ count }} ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ count }}",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "count",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/ast.json b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/ast.json
new file mode 100644
index 00000000..eeeed2fc
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/ast.json
@@ -0,0 +1,733 @@
+{
+ "type": "Program",
+ "body": [
+ {
+ "type": "ExportNamedDeclaration",
+ "declaration": {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "a",
+ "range": [
+ 20,
+ 21
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ }
+ },
+ "init": {
+ "type": "Literal",
+ "value": 42,
+ "raw": "42",
+ "range": [
+ 24,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 15
+ },
+ "end": {
+ "line": 2,
+ "column": 17
+ }
+ }
+ },
+ "range": [
+ 20,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "kind": "let",
+ "range": [
+ 16,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 17
+ }
+ }
+ },
+ "specifiers": [],
+ "source": null,
+ "exportKind": "value",
+ "range": [
+ 9,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 17
+ }
+ }
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "declaration": {
+ "type": "ClassDeclaration",
+ "id": {
+ "type": "Identifier",
+ "name": "A",
+ "range": [
+ 77,
+ 78
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ }
+ },
+ "body": {
+ "type": "ClassBody",
+ "body": [],
+ "range": [
+ 79,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 15
+ },
+ "end": {
+ "line": 8,
+ "column": 1
+ }
+ }
+ },
+ "superClass": null,
+ "range": [
+ 53,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 1
+ }
+ },
+ "decorators": [
+ {
+ "type": "Decorator",
+ "expression": {
+ "type": "Identifier",
+ "name": "Decorator",
+ "range": [
+ 54,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 1
+ },
+ "end": {
+ "line": 6,
+ "column": 10
+ }
+ }
+ },
+ "range": [
+ 53,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 0
+ },
+ "end": {
+ "line": 6,
+ "column": 10
+ }
+ }
+ }
+ ]
+ },
+ "specifiers": [],
+ "source": null,
+ "exportKind": "value",
+ "range": [
+ 64,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 1
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "id": {
+ "type": "Identifier",
+ "name": "a",
+ "range": [
+ 89,
+ 90
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 6
+ },
+ "end": {
+ "line": 9,
+ "column": 7
+ }
+ }
+ },
+ "init": {
+ "type": "NewExpression",
+ "callee": {
+ "type": "Identifier",
+ "name": "A",
+ "range": [
+ 97,
+ 98
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 15
+ }
+ }
+ },
+ "arguments": [],
+ "range": [
+ 93,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 10
+ },
+ "end": {
+ "line": 9,
+ "column": 17
+ }
+ }
+ },
+ "range": [
+ 89,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 6
+ },
+ "end": {
+ "line": 9,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "kind": "const",
+ "range": [
+ 83,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 17
+ }
+ }
+ }
+ ],
+ "sourceType": "module",
+ "range": [
+ 9,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 17
+ }
+ },
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 38,
+ 52
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "comments": []
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/parser-options.json b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/parser-options.json
new file mode 100644
index 00000000..6e1a0ab4
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/parser-options.json
@@ -0,0 +1,4 @@
+{
+ "sourceType": "module",
+ "parser": "@typescript-eslint/parser"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/requirements.json b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/requirements.json
new file mode 100644
index 00000000..945cf775
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/requirements.json
@@ -0,0 +1,3 @@
+{
+ "@typescript-eslint/parser": "^4.0.0"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/source.vue b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/source.vue
new file mode 100644
index 00000000..a91efd79
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/source.vue
@@ -0,0 +1,10 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/token-ranges.json
new file mode 100644
index 00000000..deeb00ef
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/token-ranges.json
@@ -0,0 +1,25 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/tree.json b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts-export-decorator-1/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts/ast.json b/test/fixtures/ast/multiple-scripts-with-ts/ast.json
new file mode 100644
index 00000000..7a9a4eb9
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts/ast.json
@@ -0,0 +1,544 @@
+{
+ "type": "Program",
+ "range": [
+ 9,
+ 98
+ ],
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "expression": {
+ "type": "CallExpression",
+ "arguments": [],
+ "callee": {
+ "type": "Identifier",
+ "decorators": [],
+ "name": "performGlobalSideEffect",
+ "optional": false,
+ "range": [
+ 9,
+ 32
+ ],
+ "loc": {
+ "end": {
+ "line": 2,
+ "column": 23
+ },
+ "start": {
+ "line": 2,
+ "column": 0
+ }
+ }
+ },
+ "optional": false,
+ "range": [
+ 9,
+ 34
+ ],
+ "loc": {
+ "end": {
+ "line": 2,
+ "column": 25
+ },
+ "start": {
+ "line": 2,
+ "column": 0
+ }
+ }
+ },
+ "range": [
+ 9,
+ 34
+ ],
+ "loc": {
+ "end": {
+ "line": 2,
+ "column": 25
+ },
+ "start": {
+ "line": 2,
+ "column": 0
+ }
+ }
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "range": [
+ 36,
+ 58
+ ],
+ "attributes": [],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "definite": false,
+ "id": {
+ "type": "Identifier",
+ "decorators": [],
+ "name": "named",
+ "optional": false,
+ "range": [
+ 49,
+ 54
+ ],
+ "loc": {
+ "end": {
+ "line": 4,
+ "column": 18
+ },
+ "start": {
+ "line": 4,
+ "column": 13
+ }
+ }
+ },
+ "init": {
+ "type": "Literal",
+ "raw": "1",
+ "value": 1,
+ "range": [
+ 57,
+ 58
+ ],
+ "loc": {
+ "end": {
+ "line": 4,
+ "column": 22
+ },
+ "start": {
+ "line": 4,
+ "column": 21
+ }
+ }
+ },
+ "range": [
+ 49,
+ 58
+ ],
+ "loc": {
+ "end": {
+ "line": 4,
+ "column": 22
+ },
+ "start": {
+ "line": 4,
+ "column": 13
+ }
+ }
+ }
+ ],
+ "declare": false,
+ "kind": "const",
+ "range": [
+ 43,
+ 58
+ ],
+ "loc": {
+ "end": {
+ "line": 4,
+ "column": 22
+ },
+ "start": {
+ "line": 4,
+ "column": 7
+ }
+ }
+ },
+ "exportKind": "value",
+ "source": null,
+ "specifiers": [],
+ "loc": {
+ "end": {
+ "line": 4,
+ "column": 22
+ },
+ "start": {
+ "line": 4,
+ "column": 0
+ }
+ }
+ },
+ {
+ "type": "VariableDeclaration",
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "definite": false,
+ "id": {
+ "type": "Identifier",
+ "decorators": [],
+ "name": "count",
+ "optional": false,
+ "range": [
+ 89,
+ 94
+ ],
+ "loc": {
+ "end": {
+ "line": 8,
+ "column": 9
+ },
+ "start": {
+ "line": 8,
+ "column": 4
+ }
+ }
+ },
+ "init": {
+ "type": "Literal",
+ "raw": "0",
+ "value": 0,
+ "range": [
+ 97,
+ 98
+ ],
+ "loc": {
+ "end": {
+ "line": 8,
+ "column": 13
+ },
+ "start": {
+ "line": 8,
+ "column": 12
+ }
+ }
+ },
+ "range": [
+ 89,
+ 98
+ ],
+ "loc": {
+ "end": {
+ "line": 8,
+ "column": 13
+ },
+ "start": {
+ "line": 8,
+ "column": 4
+ }
+ }
+ }
+ ],
+ "declare": false,
+ "kind": "let",
+ "range": [
+ 85,
+ 98
+ ],
+ "loc": {
+ "end": {
+ "line": 8,
+ "column": 13
+ },
+ "start": {
+ "line": 8,
+ "column": 0
+ }
+ }
+ }
+ ],
+ "comments": [],
+ "sourceType": "module",
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 70,
+ 84
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ],
+ "loc": {
+ "end": {
+ "line": 8,
+ "column": 13
+ },
+ "start": {
+ "line": 2,
+ "column": 0
+ }
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts/parser-options.json b/test/fixtures/ast/multiple-scripts-with-ts/parser-options.json
new file mode 100644
index 00000000..6e1a0ab4
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts/parser-options.json
@@ -0,0 +1,4 @@
+{
+ "sourceType": "module",
+ "parser": "@typescript-eslint/parser"
+}
diff --git a/test/fixtures/ast/multiple-scripts-with-ts/source.vue b/test/fixtures/ast/multiple-scripts-with-ts/source.vue
new file mode 100644
index 00000000..f1b3e9d4
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts/source.vue
@@ -0,0 +1,9 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts-with-ts/token-ranges.json b/test/fixtures/ast/multiple-scripts-with-ts/token-ranges.json
new file mode 100644
index 00000000..c7118715
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts/token-ranges.json
@@ -0,0 +1,18 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts-with-ts/tree.json b/test/fixtures/ast/multiple-scripts-with-ts/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts-with-ts/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts/ast.json b/test/fixtures/ast/multiple-scripts/ast.json
new file mode 100644
index 00000000..0867d769
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts/ast.json
@@ -0,0 +1,583 @@
+{
+ "type": "Program",
+ "start": 8,
+ "end": 99,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "range": [
+ 9,
+ 98
+ ],
+ "body": [
+ {
+ "type": "ExpressionStatement",
+ "start": 9,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "range": [
+ 9,
+ 34
+ ],
+ "expression": {
+ "type": "CallExpression",
+ "start": 9,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "range": [
+ 9,
+ 34
+ ],
+ "callee": {
+ "type": "Identifier",
+ "start": 9,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ },
+ "range": [
+ 9,
+ 32
+ ],
+ "name": "performGlobalSideEffect"
+ },
+ "arguments": [],
+ "optional": false
+ }
+ },
+ {
+ "type": "ExportNamedDeclaration",
+ "start": 36,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 0
+ },
+ "end": {
+ "line": 4,
+ "column": 22
+ }
+ },
+ "range": [
+ 36,
+ 58
+ ],
+ "declaration": {
+ "type": "VariableDeclaration",
+ "start": 43,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 7
+ },
+ "end": {
+ "line": 4,
+ "column": 22
+ }
+ },
+ "range": [
+ 43,
+ 58
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 49,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 13
+ },
+ "end": {
+ "line": 4,
+ "column": 22
+ }
+ },
+ "range": [
+ 49,
+ 58
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 49,
+ "end": 54,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 13
+ },
+ "end": {
+ "line": 4,
+ "column": 18
+ }
+ },
+ "range": [
+ 49,
+ 54
+ ],
+ "name": "named"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 57,
+ "end": 58,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 21
+ },
+ "end": {
+ "line": 4,
+ "column": 22
+ }
+ },
+ "range": [
+ 57,
+ 58
+ ],
+ "value": 1,
+ "raw": "1"
+ }
+ }
+ ],
+ "kind": "const"
+ },
+ "specifiers": [],
+ "source": null,
+ "attributes": []
+ },
+ {
+ "type": "VariableDeclaration",
+ "start": 85,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "range": [
+ 85,
+ 98
+ ],
+ "declarations": [
+ {
+ "type": "VariableDeclarator",
+ "start": 89,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 4
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "range": [
+ 89,
+ 98
+ ],
+ "id": {
+ "type": "Identifier",
+ "start": 89,
+ "end": 94,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 4
+ },
+ "end": {
+ "line": 8,
+ "column": 9
+ }
+ },
+ "range": [
+ 89,
+ 94
+ ],
+ "name": "count"
+ },
+ "init": {
+ "type": "Literal",
+ "start": 97,
+ "end": 98,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "range": [
+ 97,
+ 98
+ ],
+ "value": 0,
+ "raw": "0"
+ }
+ }
+ ],
+ "kind": "let"
+ }
+ ],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [
+ {
+ "type": "Punctuator",
+ "range": [
+ 0,
+ 8
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 70,
+ 84
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts/parser-options.json b/test/fixtures/ast/multiple-scripts/parser-options.json
new file mode 100644
index 00000000..2104ca43
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts/parser-options.json
@@ -0,0 +1,3 @@
+{
+ "sourceType": "module"
+}
diff --git a/test/fixtures/ast/multiple-scripts/requirements.json b/test/fixtures/ast/multiple-scripts/requirements.json
new file mode 100644
index 00000000..36659b1f
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts/requirements.json
@@ -0,0 +1,3 @@
+{
+ "eslint": ">=8"
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts/source.vue b/test/fixtures/ast/multiple-scripts/source.vue
new file mode 100644
index 00000000..f1b3e9d4
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts/source.vue
@@ -0,0 +1,9 @@
+
+
+
diff --git a/test/fixtures/ast/multiple-scripts/token-ranges.json b/test/fixtures/ast/multiple-scripts/token-ranges.json
new file mode 100644
index 00000000..c7118715
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts/token-ranges.json
@@ -0,0 +1,18 @@
+[
+ "",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/multiple-scripts/tree.json b/test/fixtures/ast/multiple-scripts/tree.json
new file mode 100644
index 00000000..0637a088
--- /dev/null
+++ b/test/fixtures/ast/multiple-scripts/tree.json
@@ -0,0 +1 @@
+[]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-errors-in-textarea/ast.json b/test/fixtures/ast/mustache-errors-in-textarea/ast.json
new file mode 100644
index 00000000..9dd73fed
--- /dev/null
+++ b/test/fixtures/ast/mustache-errors-in-textarea/ast.json
@@ -0,0 +1,495 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 15,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 36
+ }
+ },
+ "name": "textarea",
+ "rawName": "textarea",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 15,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 25,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 14
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "expression": null,
+ "references": []
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 36,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 25
+ },
+ "end": {
+ "line": 2,
+ "column": 36
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 47,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 36
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 48,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 15,
+ 24
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "value": "textarea"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 24,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 25,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 14
+ },
+ "end": {
+ "line": 2,
+ "column": 16
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "HTMLRCDataText",
+ "range": [
+ 27,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 16
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "value": "foo"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRCDataText",
+ "range": [
+ 31,
+ 34
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 20
+ },
+ "end": {
+ "line": 2,
+ "column": 23
+ }
+ },
+ "value": "bar"
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 34,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 23
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 36,
+ 46
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 25
+ },
+ "end": {
+ "line": 2,
+ "column": 35
+ }
+ },
+ "value": "textarea"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 46,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 35
+ },
+ "end": {
+ "line": 2,
+ "column": 36
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 47,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 36
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 48,
+ 58
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 58,
+ 59
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 59,
+ 60
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 4,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": [
+ {
+ "message": "Unexpected token bar",
+ "index": 31,
+ "lineNumber": 2,
+ "column": 20
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-errors-in-textarea/source.vue b/test/fixtures/ast/mustache-errors-in-textarea/source.vue
new file mode 100644
index 00000000..da4a40ab
--- /dev/null
+++ b/test/fixtures/ast/mustache-errors-in-textarea/source.vue
@@ -0,0 +1,3 @@
+
+
+
diff --git a/test/fixtures/ast/mustache-errors-in-textarea/token-ranges.json b/test/fixtures/ast/mustache-errors-in-textarea/token-ranges.json
new file mode 100644
index 00000000..8f3b13ea
--- /dev/null
+++ b/test/fixtures/ast/mustache-errors-in-textarea/token-ranges.json
@@ -0,0 +1,18 @@
+[
+ "
",
+ "\n ",
+ "",
+ "\n",
+ " ",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-errors-in-textarea/tree.json b/test/fixtures/ast/mustache-errors-in-textarea/tree.json
new file mode 100644
index 00000000..f5b30cc1
--- /dev/null
+++ b/test/fixtures/ast/mustache-errors-in-textarea/tree.json
@@ -0,0 +1,49 @@
+[
+ {
+ "type": "VElement",
+ "text": "
\n \n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/ast.json b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/ast.json
new file mode 100644
index 00000000..3d5e6b8a
--- /dev/null
+++ b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/ast.json
@@ -0,0 +1,273 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n {{a\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 19,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 15,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 17,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": "a"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 18,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 19,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 29,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 4,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": [
+ {
+ "message": "x-missing-interpolation-end",
+ "index": 16,
+ "lineNumber": 2,
+ "column": 5
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/parser-options.json b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/parser-options.json
new file mode 100644
index 00000000..466a4eef
--- /dev/null
+++ b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/parser-options.json
@@ -0,0 +1,5 @@
+{
+ "vueFeatures": {
+ "interpolationAsNonHTML": true
+ }
+}
diff --git a/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/source.vue b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/source.vue
new file mode 100644
index 00000000..ffc8cd5f
--- /dev/null
+++ b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/source.vue
@@ -0,0 +1,3 @@
+
+ {{a
+
diff --git a/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/token-ranges.json b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/token-ranges.json
new file mode 100644
index 00000000..eaa307ee
--- /dev/null
+++ b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/token-ranges.json
@@ -0,0 +1,11 @@
+[
+ "
",
+ "\n ",
+ "{{",
+ "a",
+ "\n",
+ " ",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/tree.json b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/tree.json
new file mode 100644
index 00000000..3ea9dbc0
--- /dev/null
+++ b/test/fixtures/ast/mustache-errors-opt-interpolation-as-non-html/tree.json
@@ -0,0 +1,23 @@
+[
+ {
+ "type": "VElement",
+ "text": "
\n {{a\n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "
",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n {{a\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-errors/ast.json b/test/fixtures/ast/mustache-errors/ast.json
index 7d1a3129..9fc7248b 100644
--- a/test/fixtures/ast/mustache-errors/ast.json
+++ b/test/fixtures/ast/mustache-errors/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
diff --git a/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/ast.json b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/ast.json
new file mode 100644
index 00000000..b7b14002
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/ast.json
@@ -0,0 +1,675 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 15,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 24
+ }
+ },
+ "expression": {
+ "type": "LogicalExpression",
+ "start": 17,
+ "end": 25,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "range": [
+ 17,
+ 33
+ ],
+ "left": {
+ "type": "BinaryExpression",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 17,
+ 20
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "range": [
+ 17,
+ 18
+ ],
+ "name": "a"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ],
+ "name": "b"
+ }
+ },
+ "operator": "&&",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 30,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "range": [
+ 30,
+ 33
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "range": [
+ 30,
+ 31
+ ],
+ "name": "b"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "range": [
+ 32,
+ 33
+ ],
+ "name": "c"
+ }
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "range": [
+ 17,
+ 18
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "range": [
+ 30,
+ 31
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "range": [
+ 32,
+ 33
+ ],
+ "name": "c"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 35,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 24
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 36,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 15,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "range": [
+ 17,
+ 18
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 18,
+ 19
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "&&",
+ "start": 20,
+ "end": 22,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "range": [
+ 20,
+ 30
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "range": [
+ 30,
+ 31
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 20
+ },
+ "end": {
+ "line": 2,
+ "column": 21
+ }
+ },
+ "range": [
+ 31,
+ 32
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "c",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 21
+ },
+ "end": {
+ "line": 2,
+ "column": 22
+ }
+ },
+ "range": [
+ 32,
+ 33
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 33,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 22
+ },
+ "end": {
+ "line": 2,
+ "column": 24
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 35,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 24
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 36,
+ 46
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 46,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 47,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 4,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/parser-options.json b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/parser-options.json
new file mode 100644
index 00000000..466a4eef
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/parser-options.json
@@ -0,0 +1,5 @@
+{
+ "vueFeatures": {
+ "interpolationAsNonHTML": true
+ }
+}
diff --git a/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/source.vue b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/source.vue
new file mode 100644
index 00000000..e53df4b7
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/source.vue
@@ -0,0 +1,3 @@
+
+ {{a
diff --git a/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/token-ranges.json b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/token-ranges.json
new file mode 100644
index 00000000..037316d3
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/token-ranges.json
@@ -0,0 +1,18 @@
+[
+ "",
+ "\n ",
+ "{{",
+ "a",
+ "<",
+ "b",
+ "&&",
+ "b",
+ "<",
+ "c",
+ "}}",
+ "\n",
+ " ",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/tree.json b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/tree.json
new file mode 100644
index 00000000..17268d2b
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-escape-opt-interpolation-as-non-html/tree.json
@@ -0,0 +1,72 @@
+[
+ {
+ "type": "VElement",
+ "text": "\n {{a",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{a",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html-false/ast.json b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html-false/ast.json
new file mode 100644
index 00000000..e93aa749
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html-false/ast.json
@@ -0,0 +1,650 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": "\n {{a"
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 18,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "name": "b}}",
+ "rawName": "b}}",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 18,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 12
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 27,
+ 34
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 27,
+ 34
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "name": "{{a
+ {{ab}}
+ {{ab}}
+
diff --git a/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html-false/token-ranges.json b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html-false/token-ranges.json
new file mode 100644
index 00000000..7013bd5f
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html-false/token-ranges.json
@@ -0,0 +1,23 @@
+[
+ "",
+ "\n ",
+ "{{",
+ "a",
+ "",
+ "b",
+ "}}",
+ "\n ",
+ "{{",
+ "a",
+ "",
+ "b",
+ "}}",
+ "\n",
+ " ",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html-false/tree.json b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html-false/tree.json
new file mode 100644
index 00000000..259a0467
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html-false/tree.json
@@ -0,0 +1,67 @@
+[
+ {
+ "type": "VElement",
+ "text": "\n {{ab}}\n {{ab}}\n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n {{a",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "b}}\n {{ab}}\n",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "{{ab}}\n",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "b}}\n",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/ast.json b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/ast.json
new file mode 100644
index 00000000..e2f24c2d
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/ast.json
@@ -0,0 +1,1373 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 15,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 17,
+ 20
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "range": [
+ 17,
+ 18
+ ],
+ "name": "a"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ],
+ "name": "b"
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "range": [
+ 17,
+ 18
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 22,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 27,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 29,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 29,
+ 36
+ ],
+ "left": {
+ "type": "BinaryExpression",
+ "start": 29,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "range": [
+ 29,
+ 32
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 29,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "range": [
+ 29,
+ 30
+ ],
+ "name": "a"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "range": [
+ 31,
+ 32
+ ],
+ "name": "b"
+ }
+ },
+ "operator": "&",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 33,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 33,
+ 36
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "range": [
+ 33,
+ 34
+ ],
+ "name": "a"
+ },
+ "operator": ">",
+ "right": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 35,
+ 36
+ ],
+ "name": "b"
+ }
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 29,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "range": [
+ 29,
+ 30
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "range": [
+ 31,
+ 32
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "range": [
+ 33,
+ 34
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 35,
+ 36
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 38,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 43,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 45,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 45,
+ 53
+ ],
+ "left": {
+ "type": "BinaryExpression",
+ "start": 45,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "range": [
+ 45,
+ 48
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 45,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "range": [
+ 45,
+ 46
+ ],
+ "name": "a"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 8
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "range": [
+ 47,
+ 48
+ ],
+ "name": "b"
+ }
+ },
+ "operator": "&",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 49,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 10
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 49,
+ 53
+ ],
+ "left": {
+ "type": "Literal",
+ "start": 49,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 10
+ },
+ "end": {
+ "line": 4,
+ "column": 12
+ }
+ },
+ "range": [
+ 49,
+ 51
+ ],
+ "value": 12,
+ "raw": "12"
+ },
+ "operator": ">",
+ "right": {
+ "type": "Identifier",
+ "start": 52,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 13
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 52,
+ 53
+ ],
+ "name": "b"
+ }
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 45,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "range": [
+ 45,
+ 46
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 8
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "range": [
+ 47,
+ 48
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 52,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 13
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 52,
+ 53
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 55,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 16
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 56,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 15,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "range": [
+ 17,
+ 18
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 18,
+ 19
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 20,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 22,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 27,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 29,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "range": [
+ 29,
+ 30
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "range": [
+ 30,
+ 31
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "range": [
+ 31,
+ 32
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "&",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "range": [
+ 32,
+ 33
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 33,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "range": [
+ 33,
+ 34
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "start": 34,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 12
+ }
+ },
+ "range": [
+ 34,
+ 35
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 35,
+ 36
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 36,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 15
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 38,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 43,
+ 45
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 45,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "range": [
+ 45,
+ 46
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "start": 46,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 7
+ },
+ "end": {
+ "line": 4,
+ "column": 8
+ }
+ },
+ "range": [
+ 46,
+ 47
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 8
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "range": [
+ 47,
+ 48
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "&",
+ "start": 48,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 9
+ },
+ "end": {
+ "line": 4,
+ "column": 10
+ }
+ },
+ "range": [
+ 48,
+ 49
+ ]
+ },
+ {
+ "type": "Numeric",
+ "value": "12",
+ "start": 49,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 10
+ },
+ "end": {
+ "line": 4,
+ "column": 12
+ }
+ },
+ "range": [
+ 49,
+ 51
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "start": 51,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 12
+ },
+ "end": {
+ "line": 4,
+ "column": 13
+ }
+ },
+ "range": [
+ 51,
+ 52
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 52,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 13
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 52,
+ 53
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 53,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 14
+ },
+ "end": {
+ "line": 4,
+ "column": 16
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 55,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 16
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 56,
+ 66
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 66,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 67,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 11
+ },
+ "end": {
+ "line": 6,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/parser-options.json b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/parser-options.json
new file mode 100644
index 00000000..466a4eef
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/parser-options.json
@@ -0,0 +1,5 @@
+{
+ "vueFeatures": {
+ "interpolationAsNonHTML": true
+ }
+}
diff --git a/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/source.vue b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/source.vue
new file mode 100644
index 00000000..0858e968
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/source.vue
@@ -0,0 +1,5 @@
+
+ {{ab}}
+ {{ab}}
+
diff --git a/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/token-ranges.json b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/token-ranges.json
new file mode 100644
index 00000000..d7d89c9a
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/token-ranges.json
@@ -0,0 +1,34 @@
+[
+ "",
+ "\n ",
+ "{{",
+ "a",
+ "<",
+ "b",
+ "}}",
+ "\n ",
+ "{{",
+ "a",
+ "<",
+ "b",
+ "&",
+ "a",
+ ">",
+ "b",
+ "}}",
+ "\n ",
+ "{{",
+ "a",
+ "<",
+ "b",
+ "&",
+ "12",
+ ">",
+ "b",
+ "}}",
+ "\n",
+ " ",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/tree.json b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/tree.json
new file mode 100644
index 00000000..daaedefc
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt-opt-interpolation-as-non-html/tree.json
@@ -0,0 +1,148 @@
+[
+ {
+ "type": "VElement",
+ "text": "\n {{ab}}\n {{ab}}\n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ab}}",
+ "children": [
+ {
+ "type": "BinaryExpression",
+ "text": "ab",
+ "children": [
+ {
+ "type": "BinaryExpression",
+ "text": "ab",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "a",
+ "children": []
+ },
+ {
+ "type": "Identifier",
+ "text": "b",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ab}}",
+ "children": [
+ {
+ "type": "BinaryExpression",
+ "text": "ab",
+ "children": [
+ {
+ "type": "BinaryExpression",
+ "text": "ab",
+ "children": [
+ {
+ "type": "Literal",
+ "text": "12",
+ "children": []
+ },
+ {
+ "type": "Identifier",
+ "text": "b",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-lt-gt/ast.json b/test/fixtures/ast/mustache-in-lt-gt/ast.json
new file mode 100644
index 00000000..e2f24c2d
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt/ast.json
@@ -0,0 +1,1373 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 15,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 17,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 17,
+ 20
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "range": [
+ 17,
+ 18
+ ],
+ "name": "a"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ],
+ "name": "b"
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "range": [
+ 17,
+ 18
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 22,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 27,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 15
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 29,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 29,
+ 36
+ ],
+ "left": {
+ "type": "BinaryExpression",
+ "start": 29,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "range": [
+ 29,
+ 32
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 29,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "range": [
+ 29,
+ 30
+ ],
+ "name": "a"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "range": [
+ 31,
+ 32
+ ],
+ "name": "b"
+ }
+ },
+ "operator": "&",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 33,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 33,
+ 36
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "range": [
+ 33,
+ 34
+ ],
+ "name": "a"
+ },
+ "operator": ">",
+ "right": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 35,
+ 36
+ ],
+ "name": "b"
+ }
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 29,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "range": [
+ 29,
+ 30
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "range": [
+ 31,
+ 32
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 33,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "range": [
+ 33,
+ 34
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 35,
+ 36
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 38,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 43,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 16
+ }
+ },
+ "expression": {
+ "type": "BinaryExpression",
+ "start": 45,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 45,
+ 53
+ ],
+ "left": {
+ "type": "BinaryExpression",
+ "start": 45,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "range": [
+ 45,
+ 48
+ ],
+ "left": {
+ "type": "Identifier",
+ "start": 45,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "range": [
+ 45,
+ 46
+ ],
+ "name": "a"
+ },
+ "operator": "<",
+ "right": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 8
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "range": [
+ 47,
+ 48
+ ],
+ "name": "b"
+ }
+ },
+ "operator": "&",
+ "right": {
+ "type": "BinaryExpression",
+ "start": 49,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 10
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 49,
+ 53
+ ],
+ "left": {
+ "type": "Literal",
+ "start": 49,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 10
+ },
+ "end": {
+ "line": 4,
+ "column": 12
+ }
+ },
+ "range": [
+ 49,
+ 51
+ ],
+ "value": 12,
+ "raw": "12"
+ },
+ "operator": ">",
+ "right": {
+ "type": "Identifier",
+ "start": 52,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 13
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 52,
+ 53
+ ],
+ "name": "b"
+ }
+ }
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 45,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "range": [
+ 45,
+ 46
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 8
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "range": [
+ 47,
+ 48
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ },
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 52,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 13
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 52,
+ 53
+ ],
+ "name": "b"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 55,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 16
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 56,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 15,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 17,
+ "end": 18,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "range": [
+ 17,
+ 18
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "start": 18,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 18,
+ 19
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 20,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 22,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 27,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 29,
+ "end": 30,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "range": [
+ 29,
+ 30
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "start": 30,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 8
+ }
+ },
+ "range": [
+ 30,
+ 31
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 31,
+ "end": 32,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 9
+ }
+ },
+ "range": [
+ 31,
+ 32
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "&",
+ "start": 32,
+ "end": 33,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 9
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "range": [
+ 32,
+ 33
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 33,
+ "end": 34,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "range": [
+ 33,
+ 34
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "start": 34,
+ "end": 35,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 12
+ }
+ },
+ "range": [
+ 34,
+ 35
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 35,
+ "end": 36,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 13
+ }
+ },
+ "range": [
+ 35,
+ 36
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 36,
+ 38
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 15
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 38,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 15
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 43,
+ 45
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 45,
+ "end": 46,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "range": [
+ 45,
+ 46
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "<",
+ "start": 46,
+ "end": 47,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 7
+ },
+ "end": {
+ "line": 4,
+ "column": 8
+ }
+ },
+ "range": [
+ 46,
+ 47
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 47,
+ "end": 48,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 8
+ },
+ "end": {
+ "line": 4,
+ "column": 9
+ }
+ },
+ "range": [
+ 47,
+ 48
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "&",
+ "start": 48,
+ "end": 49,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 9
+ },
+ "end": {
+ "line": 4,
+ "column": 10
+ }
+ },
+ "range": [
+ 48,
+ 49
+ ]
+ },
+ {
+ "type": "Numeric",
+ "value": "12",
+ "start": 49,
+ "end": 51,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 10
+ },
+ "end": {
+ "line": 4,
+ "column": 12
+ }
+ },
+ "range": [
+ 49,
+ 51
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ">",
+ "start": 51,
+ "end": 52,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 12
+ },
+ "end": {
+ "line": 4,
+ "column": 13
+ }
+ },
+ "range": [
+ 51,
+ 52
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "b",
+ "start": 52,
+ "end": 53,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 13
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "range": [
+ 52,
+ 53
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 53,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 14
+ },
+ "end": {
+ "line": 4,
+ "column": 16
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 55,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 16
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 56,
+ 66
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 66,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 67,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 11
+ },
+ "end": {
+ "line": 6,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-lt-gt/source.vue b/test/fixtures/ast/mustache-in-lt-gt/source.vue
new file mode 100644
index 00000000..0858e968
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt/source.vue
@@ -0,0 +1,5 @@
+
+ {{ab}}
+ {{ab}}
+
diff --git a/test/fixtures/ast/mustache-in-lt-gt/token-ranges.json b/test/fixtures/ast/mustache-in-lt-gt/token-ranges.json
new file mode 100644
index 00000000..d7d89c9a
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt/token-ranges.json
@@ -0,0 +1,34 @@
+[
+ "",
+ "\n ",
+ "{{",
+ "a",
+ "<",
+ "b",
+ "}}",
+ "\n ",
+ "{{",
+ "a",
+ "<",
+ "b",
+ "&",
+ "a",
+ ">",
+ "b",
+ "}}",
+ "\n ",
+ "{{",
+ "a",
+ "<",
+ "b",
+ "&",
+ "12",
+ ">",
+ "b",
+ "}}",
+ "\n",
+ " ",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-in-lt-gt/tree.json b/test/fixtures/ast/mustache-in-lt-gt/tree.json
new file mode 100644
index 00000000..daaedefc
--- /dev/null
+++ b/test/fixtures/ast/mustache-in-lt-gt/tree.json
@@ -0,0 +1,148 @@
+[
+ {
+ "type": "VElement",
+ "text": "\n {{ab}}\n {{ab}}\n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ab}}",
+ "children": [
+ {
+ "type": "BinaryExpression",
+ "text": "ab",
+ "children": [
+ {
+ "type": "BinaryExpression",
+ "text": "ab",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "a",
+ "children": []
+ },
+ {
+ "type": "Identifier",
+ "text": "b",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ab}}",
+ "children": [
+ {
+ "type": "BinaryExpression",
+ "text": "ab",
+ "children": [
+ {
+ "type": "BinaryExpression",
+ "text": "ab",
+ "children": [
+ {
+ "type": "Literal",
+ "text": "12",
+ "children": []
+ },
+ {
+ "type": "Identifier",
+ "text": "b",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/ast.json b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/ast.json
new file mode 100644
index 00000000..381c58cc
--- /dev/null
+++ b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/ast.json
@@ -0,0 +1,1139 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 133
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": "\n {{a"
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 18,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "name": "br",
+ "rawName": "br",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 18,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 22,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "value": "}}\n {{b"
+ },
+ {
+ "type": "VText",
+ "range": [
+ 46,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 21
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "value": "}}\n {{c"
+ },
+ {
+ "type": "VText",
+ "range": [
+ 59,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 6
+ }
+ },
+ "value": "}}\n {{"
+ },
+ {
+ "type": "VText",
+ "range": [
+ 71,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 6,
+ "column": 6
+ }
+ },
+ "value": "d}}\n {{"
+ },
+ {
+ "type": "VText",
+ "range": [
+ 84,
+ 91
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 9
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": "}}\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 91,
+ 95
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 8
+ }
+ },
+ "name": "br",
+ "rawName": "br",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 91,
+ 95
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 8
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 95,
+ 97
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 10
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 97,
+ 101
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "name": "br",
+ "rawName": "br",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 97,
+ 101
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [],
+ "endTag": null,
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 101,
+ 106
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 106,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 4
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "expression": null,
+ "references": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 119,
+ 122
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 17
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "}}\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 122,
+ 133
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 15,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 17,
+ 18
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 6
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": "a"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 18,
+ 21
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 10
+ }
+ },
+ "value": "br"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 21,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 22,
+ 24
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 24,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 29,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 31,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 6
+ },
+ "end": {
+ "line": 3,
+ "column": 7
+ }
+ },
+ "value": "b"
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 46,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 21
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 48,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 23
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 53,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 55,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 6
+ },
+ "end": {
+ "line": 4,
+ "column": 7
+ }
+ },
+ "value": "c"
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 59,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 10
+ },
+ "end": {
+ "line": 4,
+ "column": 12
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 61,
+ 66
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 12
+ },
+ "end": {
+ "line": 5,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 66,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 4
+ },
+ "end": {
+ "line": 5,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 71,
+ 72
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 5,
+ "column": 10
+ }
+ },
+ "value": "d"
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 72,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 10
+ },
+ "end": {
+ "line": 5,
+ "column": 12
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 74,
+ 79
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 12
+ },
+ "end": {
+ "line": 6,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 79,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 84,
+ 86
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 9
+ },
+ "end": {
+ "line": 6,
+ "column": 11
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 86,
+ 91
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 11
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 91,
+ 94
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 7
+ }
+ },
+ "value": "br"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 94,
+ 95
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 7
+ },
+ "end": {
+ "line": 7,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 95,
+ 97
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 10
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 97,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "br"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 100,
+ 101
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 101,
+ 106
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 106,
+ 108
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 4
+ },
+ "end": {
+ "line": 8,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 108,
+ 110
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 110,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 15
+ }
+ },
+ "value": "invalid"
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 117,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 15
+ },
+ "end": {
+ "line": 8,
+ "column": 17
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 119,
+ 121
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 17
+ },
+ "end": {
+ "line": 8,
+ "column": 19
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 121,
+ 122
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 19
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 122,
+ 132
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 132,
+ 133
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 10
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 133,
+ 134
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [
+ {
+ "type": "HTMLComment",
+ "range": [
+ 32,
+ 46
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "value": "comment"
+ }
+ ],
+ "errors": [
+ {
+ "message": "missing-end-tag-name",
+ "index": 58,
+ "lineNumber": 4,
+ "column": 9
+ },
+ {
+ "message": "missing-end-tag-name",
+ "index": 70,
+ "lineNumber": 5,
+ "column": 8
+ },
+ {
+ "message": "missing-end-tag-name",
+ "index": 83,
+ "lineNumber": 6,
+ "column": 8
+ },
+ {
+ "message": "Unexpected token {",
+ "index": 109,
+ "lineNumber": 8,
+ "column": 7
+ }
+ ]
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/parser-options.json b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/parser-options.json
new file mode 100644
index 00000000..20b845f2
--- /dev/null
+++ b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/parser-options.json
@@ -0,0 +1,5 @@
+{
+ "vueFeatures": {
+ "interpolationAsNonHTML": false
+ }
+}
diff --git a/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/source.vue b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/source.vue
new file mode 100644
index 00000000..c8b308a5
--- /dev/null
+++ b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/source.vue
@@ -0,0 +1,9 @@
+
+ {{a }}
+ {{b}}
+ {{c>}}
+ {{>d}}
+ {{>}}
+ {{
+ {{{{invalid}}}}
+
diff --git a/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/token-ranges.json b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/token-ranges.json
new file mode 100644
index 00000000..03799f9c
--- /dev/null
+++ b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/token-ranges.json
@@ -0,0 +1,42 @@
+[
+ "",
+ "\n ",
+ "{{",
+ "a",
+ " ",
+ "}}",
+ "\n ",
+ "{{",
+ "b",
+ "}}",
+ "\n ",
+ "{{",
+ "c",
+ "}}",
+ "\n ",
+ "{{",
+ "d",
+ "}}",
+ "\n ",
+ "{{",
+ "}}",
+ "\n ",
+ " ",
+ "{{",
+ " ",
+ "\n ",
+ "{{",
+ "{{",
+ "invalid",
+ "}}",
+ "}}",
+ "\n",
+ " ",
+ "\n",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/tree.json b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/tree.json
new file mode 100644
index 00000000..4ea9bf97
--- /dev/null
+++ b/test/fixtures/ast/mustache-not-closed-opt-interpolation-as-non-html-false/tree.json
@@ -0,0 +1,101 @@
+[
+ {
+ "type": "VElement",
+ "text": "\n {{a }}\n {{b}}\n {{c>}}\n {{>d}}\n {{>}}\n {{ \n {{{{invalid}}}}\n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n {{a",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "}}\n {{b",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "}}\n {{c",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "}}\n {{",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "d}}\n {{",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "}}\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "{{",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": " ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{{{invalid}}",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "}}\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-not-closed/ast.json b/test/fixtures/ast/mustache-not-closed/ast.json
index 7b15f10c..87c10c14 100644
--- a/test/fixtures/ast/mustache-not-closed/ast.json
+++ b/test/fixtures/ast/mustache-not-closed/ast.json
@@ -17,7 +17,7 @@
0
],
"body": [],
- "sourceType": "script",
+ "sourceType": "module",
"comments": [],
"tokens": [],
"templateBody": {
@@ -63,7 +63,7 @@
"type": "VText",
"range": [
10,
- 18
+ 15
],
"loc": {
"start": {
@@ -72,217 +72,210 @@
},
"end": {
"line": 2,
- "column": 7
+ "column": 4
}
},
- "value": "\n {{a"
+ "value": "\n "
},
{
- "type": "VElement",
+ "type": "VExpressionContainer",
"range": [
- 18,
- 22
+ 15,
+ 24
],
"loc": {
"start": {
"line": 2,
- "column": 7
+ "column": 4
},
"end": {
"line": 2,
- "column": 11
+ "column": 13
}
},
- "name": "br",
- "rawName": "br",
- "namespace": "http://www.w3.org/1999/xhtml",
- "startTag": {
- "type": "VStartTag",
- "range": [
- 18,
- 22
- ],
- "loc": {
- "start": {
- "line": 2,
- "column": 7
- },
- "end": {
- "line": 2,
- "column": 11
- }
- },
- "selfClosing": false,
- "attributes": []
- },
- "children": [],
- "endTag": null,
- "variables": []
+ "expression": null,
+ "references": []
},
{
"type": "VText",
"range": [
- 22,
- 32
+ 24,
+ 29
],
"loc": {
"start": {
"line": 2,
- "column": 11
+ "column": 13
},
"end": {
"line": 3,
- "column": 7
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 29,
+ 48
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 23
}
},
- "value": "}}\n {{b"
+ "expression": null,
+ "references": []
},
{
"type": "VText",
"range": [
- 46,
- 56
+ 48,
+ 53
],
"loc": {
"start": {
"line": 3,
- "column": 21
+ "column": 23
},
"end": {
"line": 4,
- "column": 7
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 53,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 12
}
},
- "value": "}}\n {{c"
+ "expression": null,
+ "references": []
},
{
"type": "VText",
"range": [
- 59,
- 68
+ 61,
+ 66
],
"loc": {
"start": {
"line": 4,
- "column": 10
+ "column": 12
},
"end": {
"line": 5,
- "column": 6
+ "column": 4
}
},
- "value": "}}\n {{"
+ "value": "\n "
},
{
- "type": "VText",
+ "type": "VExpressionContainer",
"range": [
- 71,
- 81
+ 66,
+ 74
],
"loc": {
"start": {
"line": 5,
- "column": 9
+ "column": 4
},
"end": {
- "line": 6,
- "column": 6
+ "line": 5,
+ "column": 12
}
},
- "value": "d}}\n {{"
+ "expression": null,
+ "references": []
},
{
"type": "VText",
"range": [
- 84,
- 91
+ 74,
+ 79
],
"loc": {
"start": {
- "line": 6,
- "column": 9
+ "line": 5,
+ "column": 12
},
"end": {
- "line": 7,
+ "line": 6,
"column": 4
}
},
- "value": "}}\n "
+ "value": "\n "
},
{
- "type": "VElement",
+ "type": "VExpressionContainer",
"range": [
- 91,
- 95
+ 79,
+ 86
],
"loc": {
"start": {
- "line": 7,
+ "line": 6,
"column": 4
},
"end": {
- "line": 7,
- "column": 8
+ "line": 6,
+ "column": 11
}
},
- "name": "br",
- "rawName": "br",
- "namespace": "http://www.w3.org/1999/xhtml",
- "startTag": {
- "type": "VStartTag",
- "range": [
- 91,
- 95
- ],
- "loc": {
- "start": {
- "line": 7,
- "column": 4
- },
- "end": {
- "line": 7,
- "column": 8
- }
- },
- "selfClosing": false,
- "attributes": []
- },
- "children": [],
- "endTag": null,
- "variables": []
+ "expression": null,
+ "references": []
},
{
"type": "VText",
"range": [
- 95,
- 97
+ 86,
+ 91
],
"loc": {
"start": {
- "line": 7,
- "column": 8
+ "line": 6,
+ "column": 11
},
"end": {
"line": 7,
- "column": 10
+ "column": 4
}
},
- "value": "{{"
+ "value": "\n "
},
{
"type": "VElement",
"range": [
- 97,
- 101
+ 91,
+ 95
],
"loc": {
"start": {
"line": 7,
- "column": 10
+ "column": 4
},
"end": {
"line": 7,
- "column": 14
+ "column": 8
}
},
"name": "br",
@@ -291,17 +284,17 @@
"startTag": {
"type": "VStartTag",
"range": [
- 97,
- 101
+ 91,
+ 95
],
"loc": {
"start": {
"line": 7,
- "column": 10
+ "column": 4
},
"end": {
"line": 7,
- "column": 14
+ "column": 8
}
},
"selfClosing": false,
@@ -311,34 +304,16 @@
"endTag": null,
"variables": []
},
- {
- "type": "VText",
- "range": [
- 101,
- 106
- ],
- "loc": {
- "start": {
- "line": 7,
- "column": 14
- },
- "end": {
- "line": 8,
- "column": 4
- }
- },
- "value": "\n "
- },
{
"type": "VExpressionContainer",
"range": [
- 106,
+ 95,
119
],
"loc": {
"start": {
- "line": 8,
- "column": 4
+ "line": 7,
+ "column": 8
},
"end": {
"line": 8,
@@ -462,55 +437,19 @@
"type": "HTMLText",
"range": [
17,
- 18
- ],
- "loc": {
- "start": {
- "line": 2,
- "column": 6
- },
- "end": {
- "line": 2,
- "column": 7
- }
- },
- "value": "a"
- },
- {
- "type": "HTMLTagOpen",
- "range": [
- 18,
- 21
- ],
- "loc": {
- "start": {
- "line": 2,
- "column": 7
- },
- "end": {
- "line": 2,
- "column": 10
- }
- },
- "value": "br"
- },
- {
- "type": "HTMLTagClose",
- "range": [
- 21,
22
],
"loc": {
"start": {
"line": 2,
- "column": 10
+ "column": 6
},
"end": {
"line": 2,
"column": 11
}
},
- "value": ""
+ "value": "a "
},
{
"type": "VExpressionEnd",
@@ -570,7 +509,7 @@
"type": "HTMLText",
"range": [
31,
- 32
+ 46
],
"loc": {
"start": {
@@ -579,10 +518,10 @@
},
"end": {
"line": 3,
- "column": 7
+ "column": 21
}
},
- "value": "b"
+ "value": "b"
},
{
"type": "VExpressionEnd",
@@ -642,7 +581,7 @@
"type": "HTMLText",
"range": [
55,
- 56
+ 59
],
"loc": {
"start": {
@@ -651,10 +590,10 @@
},
"end": {
"line": 4,
- "column": 7
+ "column": 10
}
},
- "value": "c"
+ "value": "c>"
},
{
"type": "VExpressionEnd",
@@ -713,20 +652,20 @@
{
"type": "HTMLText",
"range": [
- 71,
+ 68,
72
],
"loc": {
"start": {
"line": 5,
- "column": 9
+ "column": 6
},
"end": {
"line": 5,
"column": 10
}
},
- "value": "d"
+ "value": ">d"
},
{
"type": "VExpressionEnd",
@@ -782,6 +721,24 @@
},
"value": "{{"
},
+ {
+ "type": "HTMLText",
+ "range": [
+ 81,
+ 84
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 6
+ },
+ "end": {
+ "line": 6,
+ "column": 9
+ }
+ },
+ "value": ">"
+ },
{
"type": "VExpressionEnd",
"range": [
@@ -873,40 +830,22 @@
"value": "{{"
},
{
- "type": "HTMLTagOpen",
+ "type": "HTMLText",
"range": [
97,
- 100
- ],
- "loc": {
- "start": {
- "line": 7,
- "column": 10
- },
- "end": {
- "line": 7,
- "column": 13
- }
- },
- "value": "br"
- },
- {
- "type": "HTMLTagClose",
- "range": [
- 100,
101
],
"loc": {
"start": {
"line": 7,
- "column": 13
+ "column": 10
},
"end": {
"line": 7,
"column": 14
}
},
- "value": ""
+ "value": " "
},
{
"type": "HTMLWhitespace",
@@ -926,59 +865,23 @@
},
"value": "\n "
},
- {
- "type": "VExpressionStart",
- "range": [
- 106,
- 108
- ],
- "loc": {
- "start": {
- "line": 8,
- "column": 4
- },
- "end": {
- "line": 8,
- "column": 6
- }
- },
- "value": "{{"
- },
- {
- "type": "VExpressionStart",
- "range": [
- 108,
- 110
- ],
- "loc": {
- "start": {
- "line": 8,
- "column": 6
- },
- "end": {
- "line": 8,
- "column": 8
- }
- },
- "value": "{{"
- },
{
"type": "HTMLText",
"range": [
- 110,
+ 106,
117
],
"loc": {
"start": {
"line": 8,
- "column": 8
+ "column": 4
},
"end": {
"line": 8,
"column": 15
}
},
- "value": "invalid"
+ "value": "{{{{invalid"
},
{
"type": "VExpressionEnd",
@@ -1089,50 +992,43 @@
"value": "\n"
}
],
- "comments": [
- {
- "type": "HTMLComment",
- "range": [
- 32,
- 46
- ],
- "loc": {
- "start": {
- "line": 3,
- "column": 7
- },
- "end": {
- "line": 3,
- "column": 21
- }
- },
- "value": "comment"
- }
- ],
+ "comments": [],
"errors": [
{
- "message": "missing-end-tag-name",
+ "message": "Unexpected end of expression.",
+ "index": 22,
+ "lineNumber": 2,
+ "column": 11
+ },
+ {
+ "message": "Assigning to rvalue",
+ "index": 36,
+ "lineNumber": 3,
+ "column": 11
+ },
+ {
+ "message": "Unterminated regular expression",
"index": 58,
"lineNumber": 4,
"column": 9
},
{
- "message": "missing-end-tag-name",
- "index": 70,
+ "message": "Unexpected token <",
+ "index": 68,
"lineNumber": 5,
- "column": 8
+ "column": 6
},
{
- "message": "missing-end-tag-name",
- "index": 83,
+ "message": "Unexpected token <",
+ "index": 81,
"lineNumber": 6,
- "column": 8
+ "column": 6
},
{
- "message": "Unexpected token {",
- "index": 109,
- "lineNumber": 8,
- "column": 7
+ "message": "Unexpected token <",
+ "index": 97,
+ "lineNumber": 7,
+ "column": 10
}
]
}
diff --git a/test/fixtures/ast/mustache-not-closed/token-ranges.json b/test/fixtures/ast/mustache-not-closed/token-ranges.json
index 03799f9c..a2618a5c 100644
--- a/test/fixtures/ast/mustache-not-closed/token-ranges.json
+++ b/test/fixtures/ast/mustache-not-closed/token-ranges.json
@@ -3,40 +3,35 @@
">",
"\n ",
"{{",
- "a",
- " ",
+ "a ",
"}}",
"\n ",
"{{",
- "b",
+ "b",
"}}",
"\n ",
"{{",
- "c",
+ "c>",
"}}",
"\n ",
"{{",
- "d",
+ ">d",
"}}",
"\n ",
"{{",
+ ">",
"}}",
"\n ",
" ",
"{{",
- " ",
+ " ",
"\n ",
- "{{",
- "{{",
- "invalid",
+ "{{{{invalid",
"}}",
"}}",
"\n",
" ",
- "\n",
- ""
+ "\n"
]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-not-closed/tree.json b/test/fixtures/ast/mustache-not-closed/tree.json
index 4ea9bf97..ee50070a 100644
--- a/test/fixtures/ast/mustache-not-closed/tree.json
+++ b/test/fixtures/ast/mustache-not-closed/tree.json
@@ -10,59 +10,57 @@
},
{
"type": "VText",
- "text": "\n {{a",
+ "text": "\n ",
"children": []
},
{
- "type": "VElement",
- "text": " ",
- "children": [
- {
- "type": "VStartTag",
- "text": " ",
- "children": []
- }
- ]
+ "type": "VExpressionContainer",
+ "text": "{{a }}",
+ "children": []
},
{
"type": "VText",
- "text": "}}\n {{b",
+ "text": "\n ",
"children": []
},
{
- "type": "VText",
- "text": "}}\n {{c",
+ "type": "VExpressionContainer",
+ "text": "{{b}}",
"children": []
},
{
"type": "VText",
- "text": "}}\n {{",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{c>}}",
"children": []
},
{
"type": "VText",
- "text": "d}}\n {{",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{>d}}",
"children": []
},
{
"type": "VText",
- "text": "}}\n ",
+ "text": "\n ",
"children": []
},
{
- "type": "VElement",
- "text": " ",
- "children": [
- {
- "type": "VStartTag",
- "text": " ",
- "children": []
- }
- ]
+ "type": "VExpressionContainer",
+ "text": "{{>}}",
+ "children": []
},
{
"type": "VText",
- "text": "{{",
+ "text": "\n ",
"children": []
},
{
@@ -76,14 +74,9 @@
}
]
},
- {
- "type": "VText",
- "text": "\n ",
- "children": []
- },
{
"type": "VExpressionContainer",
- "text": "{{{{invalid}}",
+ "text": "{{ \n {{{{invalid}}",
"children": []
},
{
diff --git a/test/fixtures/ast/mustache-with-space/ast.json b/test/fixtures/ast/mustache-with-space/ast.json
new file mode 100644
index 00000000..7abbc283
--- /dev/null
+++ b/test/fixtures/ast/mustache-with-space/ast.json
@@ -0,0 +1,366 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 15,
+ 24
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ],
+ "name": "a"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ],
+ "name": "a"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 24,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 25,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ }
+ },
+ "variables": [],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 9
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 9
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 9,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 9
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionStart",
+ "range": [
+ 15,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 4
+ },
+ "end": {
+ "line": 2,
+ "column": 6
+ }
+ },
+ "value": "{{"
+ },
+ {
+ "type": "Identifier",
+ "value": "a",
+ "start": 19,
+ "end": 20,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "range": [
+ 19,
+ 20
+ ]
+ },
+ {
+ "type": "VExpressionEnd",
+ "range": [
+ 22,
+ 24
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "value": "}}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 24,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 25,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 35,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 36,
+ 37
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 4,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ }
+}
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-with-space/source.vue b/test/fixtures/ast/mustache-with-space/source.vue
new file mode 100644
index 00000000..b662d38d
--- /dev/null
+++ b/test/fixtures/ast/mustache-with-space/source.vue
@@ -0,0 +1,3 @@
+
+ {{ a }}
+
diff --git a/test/fixtures/ast/mustache-with-space/token-ranges.json b/test/fixtures/ast/mustache-with-space/token-ranges.json
new file mode 100644
index 00000000..29dffb82
--- /dev/null
+++ b/test/fixtures/ast/mustache-with-space/token-ranges.json
@@ -0,0 +1,12 @@
+[
+ "",
+ "\n ",
+ "{{",
+ "a",
+ "}}",
+ "\n",
+ " ",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-with-space/tree.json b/test/fixtures/ast/mustache-with-space/tree.json
new file mode 100644
index 00000000..c65f265f
--- /dev/null
+++ b/test/fixtures/ast/mustache-with-space/tree.json
@@ -0,0 +1,39 @@
+[
+ {
+ "type": "VElement",
+ "text": "\n {{ a }}\n ",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VExpressionContainer",
+ "text": "{{ a }}",
+ "children": [
+ {
+ "type": "Identifier",
+ "text": "a",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": " ",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/ast/mustache-without-open-in-textarea/ast.json b/test/fixtures/ast/mustache-without-open-in-textarea/ast.json
new file mode 100644
index 00000000..cc24dc1c
--- /dev/null
+++ b/test/fixtures/ast/mustache-without-open-in-textarea/ast.json
@@ -0,0 +1,618 @@
+{
+ "type": "Program",
+ "start": 0,
+ "end": 0,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 0
+ }
+ },
+ "range": [
+ 0,
+ 0
+ ],
+ "body": [],
+ "sourceType": "module",
+ "comments": [],
+ "tokens": [],
+ "templateBody": {
+ "type": "VElement",
+ "range": [
+ 0,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 4,
+ "column": 11
+ }
+ },
+ "name": "template",
+ "rawName": "template",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 10
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 10,
+ 13
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 13,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 11
+ }
+ },
+ "expression": {
+ "type": "Literal",
+ "start": 16,
+ "end": 19,
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 5
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "range": [
+ 16,
+ 19
+ ],
+ "value": 123,
+ "raw": "123"
+ },
+ "references": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 22,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 25,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 3,
+ "column": 32
+ }
+ },
+ "name": "textarea",
+ "rawName": "textarea",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 25,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 2
+ },
+ "end": {
+ "line": 3,
+ "column": 12
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 35,
+ 44
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 12
+ },
+ "end": {
+ "line": 3,
+ "column": 21
+ }
+ },
+ "value": " }}