",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "hello
",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "class=\"text\"",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "class",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "\"text\"",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "hello",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": "
",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n\n",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n\n",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables01/document-fragment.json b/test/fixtures/document-fragment/style-variables01/document-fragment.json
new file mode 100644
index 00000000..ad788a15
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables01/document-fragment.json
@@ -0,0 +1,4244 @@
+{
+ "type": "VDocumentFragment",
+ "range": [
+ 0,
+ 347
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 26,
+ "column": 0
+ }
+ },
+ "children": [
+ {
+ "type": "VElement",
+ "range": [
+ 0,
+ 54
+ ],
+ "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,
+ 13
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 10
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 13,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 31
+ }
+ },
+ "name": "div",
+ "rawName": "div",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 13,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 18,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 18,
+ 23
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ },
+ "name": "class",
+ "rawName": "class"
+ },
+ "value": {
+ "type": "VLiteral",
+ "range": [
+ 24,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "value": "text"
+ }
+ }
+ ]
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 31,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 20
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "value": "hello"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 36,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 25
+ },
+ "end": {
+ "line": 2,
+ "column": 31
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 42,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 31
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 43,
+ 54
+ ],
+ "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,
+ 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": "HTMLIdentifier",
+ "range": [
+ 18,
+ 23
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ },
+ "value": "class"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 23,
+ 24
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 24,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "value": "text"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 31,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 20
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "value": "hello"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 36,
+ 41
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 25
+ },
+ "end": {
+ "line": 2,
+ "column": 30
+ }
+ },
+ "value": "div"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 41,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 30
+ },
+ "end": {
+ "line": 2,
+ "column": 31
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 42,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 31
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 43,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 53,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 54,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 56,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 63,
+ 64
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 64,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 6,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 67,
+ 73
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 2
+ },
+ "end": {
+ "line": 6,
+ "column": 8
+ }
+ },
+ "value": "export"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 73,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 8
+ },
+ "end": {
+ "line": 6,
+ "column": 9
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 74,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 9
+ },
+ "end": {
+ "line": 6,
+ "column": 16
+ }
+ },
+ "value": "default"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 81,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 16
+ },
+ "end": {
+ "line": 6,
+ "column": 17
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 82,
+ 83
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 17
+ },
+ "end": {
+ "line": 6,
+ "column": 18
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 83,
+ 88
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 18
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 88,
+ 94
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 10
+ }
+ },
+ "value": "data()"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 94,
+ 95
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 95,
+ 96
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 11
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 96,
+ 103
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 103,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 12
+ }
+ },
+ "value": "return"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 109,
+ 110
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 110,
+ 111
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 13
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 111,
+ 120
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 120,
+ 126
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ },
+ "value": "color:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 126,
+ 127
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 15
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 127,
+ 133
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 15
+ },
+ "end": {
+ "line": 9,
+ "column": 21
+ }
+ },
+ "value": "'red',"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 133,
+ 142
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 21
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 142,
+ 147
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 8
+ },
+ "end": {
+ "line": 10,
+ "column": 13
+ }
+ },
+ "value": "font:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 147,
+ 148
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 13
+ },
+ "end": {
+ "line": 10,
+ "column": 14
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 148,
+ 149
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 14
+ },
+ "end": {
+ "line": 10,
+ "column": 15
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 149,
+ 160
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 15
+ },
+ "end": {
+ "line": 11,
+ "column": 10
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 160,
+ 165
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 10
+ },
+ "end": {
+ "line": 11,
+ "column": 15
+ }
+ },
+ "value": "size:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 165,
+ 166
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 15
+ },
+ "end": {
+ "line": 11,
+ "column": 16
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 166,
+ 172
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 16
+ },
+ "end": {
+ "line": 11,
+ "column": 22
+ }
+ },
+ "value": "'2em',"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 172,
+ 181
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 22
+ },
+ "end": {
+ "line": 12,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 181,
+ 183
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 8
+ },
+ "end": {
+ "line": 12,
+ "column": 10
+ }
+ },
+ "value": "},"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 183,
+ 190
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 10
+ },
+ "end": {
+ "line": 13,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 190,
+ 191
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 6
+ },
+ "end": {
+ "line": 13,
+ "column": 7
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 191,
+ 196
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 7
+ },
+ "end": {
+ "line": 14,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 196,
+ 198
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 4
+ },
+ "end": {
+ "line": 14,
+ "column": 6
+ }
+ },
+ "value": "},"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 198,
+ 201
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 6
+ },
+ "end": {
+ "line": 15,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 201,
+ 202
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 2
+ },
+ "end": {
+ "line": 15,
+ "column": 3
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 202,
+ 203
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 3
+ },
+ "end": {
+ "line": 16,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 203,
+ 211
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 211,
+ 212
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 8
+ },
+ "end": {
+ "line": 16,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 212,
+ 214
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 9
+ },
+ "end": {
+ "line": 18,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 214,
+ 220
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 0
+ },
+ "end": {
+ "line": 18,
+ "column": 6
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 220,
+ 221
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 6
+ },
+ "end": {
+ "line": 18,
+ "column": 7
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 221,
+ 224
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 7
+ },
+ "end": {
+ "line": 19,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 224,
+ 229
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 2
+ },
+ "end": {
+ "line": 19,
+ "column": 7
+ }
+ },
+ "value": ".text"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 229,
+ 230
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 7
+ },
+ "end": {
+ "line": 19,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 230,
+ 231
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 8
+ },
+ "end": {
+ "line": 19,
+ "column": 9
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 231,
+ 236
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 9
+ },
+ "end": {
+ "line": 20,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 236,
+ 242
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 4
+ },
+ "end": {
+ "line": 20,
+ "column": 10
+ }
+ },
+ "value": "color:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 242,
+ 243
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 10
+ },
+ "end": {
+ "line": 20,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 243,
+ 249
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 11
+ },
+ "end": {
+ "line": 20,
+ "column": 17
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 249,
+ 250
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 17
+ },
+ "end": {
+ "line": 20,
+ "column": 18
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Identifier",
+ "value": "color",
+ "start": 250,
+ "end": 255,
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 18
+ },
+ "end": {
+ "line": 20,
+ "column": 23
+ }
+ },
+ "range": [
+ 250,
+ 255
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 255,
+ 256
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 23
+ },
+ "end": {
+ "line": 20,
+ "column": 24
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 256,
+ 257
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 24
+ },
+ "end": {
+ "line": 20,
+ "column": 25
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 257,
+ 263
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 25
+ },
+ "end": {
+ "line": 22,
+ "column": 4
+ }
+ },
+ "value": "\n\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 263,
+ 265
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 4
+ },
+ "end": {
+ "line": 22,
+ "column": 6
+ }
+ },
+ "value": "/*"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 265,
+ 266
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 6
+ },
+ "end": {
+ "line": 22,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 266,
+ 277
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 7
+ },
+ "end": {
+ "line": 22,
+ "column": 18
+ }
+ },
+ "value": "expressions"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 277,
+ 278
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 18
+ },
+ "end": {
+ "line": 22,
+ "column": 19
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 278,
+ 283
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 19
+ },
+ "end": {
+ "line": 22,
+ "column": 24
+ }
+ },
+ "value": "(wrap"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 283,
+ 284
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 24
+ },
+ "end": {
+ "line": 22,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 284,
+ 286
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 25
+ },
+ "end": {
+ "line": 22,
+ "column": 27
+ }
+ },
+ "value": "in"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 286,
+ 287
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 27
+ },
+ "end": {
+ "line": 22,
+ "column": 28
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 287,
+ 294
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 28
+ },
+ "end": {
+ "line": 22,
+ "column": 35
+ }
+ },
+ "value": "quotes)"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 294,
+ 295
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 35
+ },
+ "end": {
+ "line": 22,
+ "column": 36
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 295,
+ 297
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 36
+ },
+ "end": {
+ "line": 22,
+ "column": 38
+ }
+ },
+ "value": "*/"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 297,
+ 302
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 38
+ },
+ "end": {
+ "line": 23,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 302,
+ 312
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 4
+ },
+ "end": {
+ "line": 23,
+ "column": 14
+ }
+ },
+ "value": "font-size:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 312,
+ 313
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 14
+ },
+ "end": {
+ "line": 23,
+ "column": 15
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 313,
+ 319
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 15
+ },
+ "end": {
+ "line": 23,
+ "column": 21
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 319,
+ 320
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 21
+ },
+ "end": {
+ "line": 23,
+ "column": 22
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 320,
+ 321
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 22
+ },
+ "end": {
+ "line": 23,
+ "column": 23
+ }
+ },
+ "value": "'"
+ },
+ {
+ "type": "Identifier",
+ "value": "font",
+ "start": 321,
+ "end": 325,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 23
+ },
+ "end": {
+ "line": 23,
+ "column": 27
+ }
+ },
+ "range": [
+ 321,
+ 325
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ".",
+ "start": 325,
+ "end": 326,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 27
+ },
+ "end": {
+ "line": 23,
+ "column": 28
+ }
+ },
+ "range": [
+ 325,
+ 326
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "size",
+ "start": 326,
+ "end": 330,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 28
+ },
+ "end": {
+ "line": 23,
+ "column": 32
+ }
+ },
+ "range": [
+ 326,
+ 330
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 330,
+ 331
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 32
+ },
+ "end": {
+ "line": 23,
+ "column": 33
+ }
+ },
+ "value": "'"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 331,
+ 332
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 33
+ },
+ "end": {
+ "line": 23,
+ "column": 34
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 332,
+ 333
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 34
+ },
+ "end": {
+ "line": 23,
+ "column": 35
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 333,
+ 336
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 35
+ },
+ "end": {
+ "line": 24,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 336,
+ 337
+ ],
+ "loc": {
+ "start": {
+ "line": 24,
+ "column": 2
+ },
+ "end": {
+ "line": 24,
+ "column": 3
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 337,
+ 338
+ ],
+ "loc": {
+ "start": {
+ "line": 24,
+ "column": 3
+ },
+ "end": {
+ "line": 25,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 338,
+ 345
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 0
+ },
+ "end": {
+ "line": 25,
+ "column": 7
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 345,
+ 346
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 7
+ },
+ "end": {
+ "line": 25,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 346,
+ 347
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 8
+ },
+ "end": {
+ "line": 26,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 54,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 56,
+ 212
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 9
+ }
+ },
+ "name": "script",
+ "rawName": "script",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 56,
+ 64
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 64,
+ 203
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 16,
+ "column": 0
+ }
+ },
+ "value": "\n export default {\n data() {\n return {\n color: 'red',\n font: {\n size: '2em',\n },\n }\n },\n }\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 203,
+ 212
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 9
+ }
+ }
+ },
+ "variables": []
+ },
+ {
+ "type": "VText",
+ "range": [
+ 212,
+ 214
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 9
+ },
+ "end": {
+ "line": 18,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 214,
+ 346
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 0
+ },
+ "end": {
+ "line": 25,
+ "column": 8
+ }
+ },
+ "name": "style",
+ "rawName": "style",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 214,
+ 221
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 0
+ },
+ "end": {
+ "line": 18,
+ "column": 7
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 221,
+ 243
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 7
+ },
+ "end": {
+ "line": 20,
+ "column": 11
+ }
+ },
+ "value": "\n .text {\n color: "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 243,
+ 256
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 11
+ },
+ "end": {
+ "line": 20,
+ "column": 24
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 250,
+ "end": 255,
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 18
+ },
+ "end": {
+ "line": 20,
+ "column": 23
+ }
+ },
+ "range": [
+ 250,
+ 255
+ ],
+ "name": "color"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 250,
+ "end": 255,
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 18
+ },
+ "end": {
+ "line": 20,
+ "column": 23
+ }
+ },
+ "range": [
+ 250,
+ 255
+ ],
+ "name": "color"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 256,
+ 313
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 24
+ },
+ "end": {
+ "line": 23,
+ "column": 15
+ }
+ },
+ "value": ";\n\n /* expressions (wrap in quotes) */\n font-size: "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 313,
+ 332
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 15
+ },
+ "end": {
+ "line": 23,
+ "column": 34
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 321,
+ "end": 330,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 23
+ },
+ "end": {
+ "line": 23,
+ "column": 32
+ }
+ },
+ "range": [
+ 321,
+ 330
+ ],
+ "object": {
+ "type": "Identifier",
+ "start": 321,
+ "end": 325,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 23
+ },
+ "end": {
+ "line": 23,
+ "column": 27
+ }
+ },
+ "range": [
+ 321,
+ 325
+ ],
+ "name": "font"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 326,
+ "end": 330,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 28
+ },
+ "end": {
+ "line": 23,
+ "column": 32
+ }
+ },
+ "range": [
+ 326,
+ 330
+ ],
+ "name": "size"
+ },
+ "computed": false
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 321,
+ "end": 325,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 23
+ },
+ "end": {
+ "line": 23,
+ "column": 27
+ }
+ },
+ "range": [
+ 321,
+ 325
+ ],
+ "name": "font"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 332,
+ 338
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 34
+ },
+ "end": {
+ "line": 25,
+ "column": 0
+ }
+ },
+ "value": ";\n }\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 338,
+ 346
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 0
+ },
+ "end": {
+ "line": 25,
+ "column": 8
+ }
+ }
+ },
+ "variables": [],
+ "style": true
+ },
+ {
+ "type": "VText",
+ "range": [
+ 346,
+ 347
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 8
+ },
+ "end": {
+ "line": 26,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "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": "HTMLIdentifier",
+ "range": [
+ 18,
+ 23
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 12
+ }
+ },
+ "value": "class"
+ },
+ {
+ "type": "HTMLAssociation",
+ "range": [
+ 23,
+ 24
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 12
+ },
+ "end": {
+ "line": 2,
+ "column": 13
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLLiteral",
+ "range": [
+ 24,
+ 30
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 13
+ },
+ "end": {
+ "line": 2,
+ "column": 19
+ }
+ },
+ "value": "text"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 30,
+ 31
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 19
+ },
+ "end": {
+ "line": 2,
+ "column": 20
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 31,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 20
+ },
+ "end": {
+ "line": 2,
+ "column": 25
+ }
+ },
+ "value": "hello"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 36,
+ 41
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 25
+ },
+ "end": {
+ "line": 2,
+ "column": 30
+ }
+ },
+ "value": "div"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 41,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 30
+ },
+ "end": {
+ "line": 2,
+ "column": 31
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 42,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 31
+ },
+ "end": {
+ "line": 3,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 43,
+ 53
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 0
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "template"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 53,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 54,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 56,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 7
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 63,
+ 64
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 64,
+ 67
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 6,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 67,
+ 73
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 2
+ },
+ "end": {
+ "line": 6,
+ "column": 8
+ }
+ },
+ "value": "export"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 73,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 8
+ },
+ "end": {
+ "line": 6,
+ "column": 9
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 74,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 9
+ },
+ "end": {
+ "line": 6,
+ "column": 16
+ }
+ },
+ "value": "default"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 81,
+ 82
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 16
+ },
+ "end": {
+ "line": 6,
+ "column": 17
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 82,
+ 83
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 17
+ },
+ "end": {
+ "line": 6,
+ "column": 18
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 83,
+ 88
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 18
+ },
+ "end": {
+ "line": 7,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 88,
+ 94
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 4
+ },
+ "end": {
+ "line": 7,
+ "column": 10
+ }
+ },
+ "value": "data()"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 94,
+ 95
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 10
+ },
+ "end": {
+ "line": 7,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 95,
+ 96
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 11
+ },
+ "end": {
+ "line": 7,
+ "column": 12
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 96,
+ 103
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 103,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 6
+ },
+ "end": {
+ "line": 8,
+ "column": 12
+ }
+ },
+ "value": "return"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 109,
+ 110
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 12
+ },
+ "end": {
+ "line": 8,
+ "column": 13
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 110,
+ 111
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 13
+ },
+ "end": {
+ "line": 8,
+ "column": 14
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 111,
+ 120
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 120,
+ 126
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 14
+ }
+ },
+ "value": "color:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 126,
+ 127
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 15
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 127,
+ 133
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 15
+ },
+ "end": {
+ "line": 9,
+ "column": 21
+ }
+ },
+ "value": "'red',"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 133,
+ 142
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 21
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 142,
+ 147
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 8
+ },
+ "end": {
+ "line": 10,
+ "column": 13
+ }
+ },
+ "value": "font:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 147,
+ 148
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 13
+ },
+ "end": {
+ "line": 10,
+ "column": 14
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 148,
+ 149
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 14
+ },
+ "end": {
+ "line": 10,
+ "column": 15
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 149,
+ 160
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 15
+ },
+ "end": {
+ "line": 11,
+ "column": 10
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 160,
+ 165
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 10
+ },
+ "end": {
+ "line": 11,
+ "column": 15
+ }
+ },
+ "value": "size:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 165,
+ 166
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 15
+ },
+ "end": {
+ "line": 11,
+ "column": 16
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 166,
+ 172
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 16
+ },
+ "end": {
+ "line": 11,
+ "column": 22
+ }
+ },
+ "value": "'2em',"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 172,
+ 181
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 22
+ },
+ "end": {
+ "line": 12,
+ "column": 8
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 181,
+ 183
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 8
+ },
+ "end": {
+ "line": 12,
+ "column": 10
+ }
+ },
+ "value": "},"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 183,
+ 190
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 10
+ },
+ "end": {
+ "line": 13,
+ "column": 6
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 190,
+ 191
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 6
+ },
+ "end": {
+ "line": 13,
+ "column": 7
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 191,
+ 196
+ ],
+ "loc": {
+ "start": {
+ "line": 13,
+ "column": 7
+ },
+ "end": {
+ "line": 14,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 196,
+ 198
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 4
+ },
+ "end": {
+ "line": 14,
+ "column": 6
+ }
+ },
+ "value": "},"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 198,
+ 201
+ ],
+ "loc": {
+ "start": {
+ "line": 14,
+ "column": 6
+ },
+ "end": {
+ "line": 15,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 201,
+ 202
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 2
+ },
+ "end": {
+ "line": 15,
+ "column": 3
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 202,
+ 203
+ ],
+ "loc": {
+ "start": {
+ "line": 15,
+ "column": 3
+ },
+ "end": {
+ "line": 16,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 203,
+ 211
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 0
+ },
+ "end": {
+ "line": 16,
+ "column": 8
+ }
+ },
+ "value": "script"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 211,
+ 212
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 8
+ },
+ "end": {
+ "line": 16,
+ "column": 9
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 212,
+ 214
+ ],
+ "loc": {
+ "start": {
+ "line": 16,
+ "column": 9
+ },
+ "end": {
+ "line": 18,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 214,
+ 220
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 0
+ },
+ "end": {
+ "line": 18,
+ "column": 6
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 220,
+ 221
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 6
+ },
+ "end": {
+ "line": 18,
+ "column": 7
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 221,
+ 224
+ ],
+ "loc": {
+ "start": {
+ "line": 18,
+ "column": 7
+ },
+ "end": {
+ "line": 19,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 224,
+ 229
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 2
+ },
+ "end": {
+ "line": 19,
+ "column": 7
+ }
+ },
+ "value": ".text"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 229,
+ 230
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 7
+ },
+ "end": {
+ "line": 19,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 230,
+ 231
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 8
+ },
+ "end": {
+ "line": 19,
+ "column": 9
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 231,
+ 236
+ ],
+ "loc": {
+ "start": {
+ "line": 19,
+ "column": 9
+ },
+ "end": {
+ "line": 20,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 236,
+ 242
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 4
+ },
+ "end": {
+ "line": 20,
+ "column": 10
+ }
+ },
+ "value": "color:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 242,
+ 243
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 10
+ },
+ "end": {
+ "line": 20,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 243,
+ 249
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 11
+ },
+ "end": {
+ "line": 20,
+ "column": 17
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 249,
+ 250
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 17
+ },
+ "end": {
+ "line": 20,
+ "column": 18
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Identifier",
+ "value": "color",
+ "start": 250,
+ "end": 255,
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 18
+ },
+ "end": {
+ "line": 20,
+ "column": 23
+ }
+ },
+ "range": [
+ 250,
+ 255
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 255,
+ 256
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 23
+ },
+ "end": {
+ "line": 20,
+ "column": 24
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 256,
+ 257
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 24
+ },
+ "end": {
+ "line": 20,
+ "column": 25
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 257,
+ 263
+ ],
+ "loc": {
+ "start": {
+ "line": 20,
+ "column": 25
+ },
+ "end": {
+ "line": 22,
+ "column": 4
+ }
+ },
+ "value": "\n\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 263,
+ 265
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 4
+ },
+ "end": {
+ "line": 22,
+ "column": 6
+ }
+ },
+ "value": "/*"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 265,
+ 266
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 6
+ },
+ "end": {
+ "line": 22,
+ "column": 7
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 266,
+ 277
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 7
+ },
+ "end": {
+ "line": 22,
+ "column": 18
+ }
+ },
+ "value": "expressions"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 277,
+ 278
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 18
+ },
+ "end": {
+ "line": 22,
+ "column": 19
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 278,
+ 283
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 19
+ },
+ "end": {
+ "line": 22,
+ "column": 24
+ }
+ },
+ "value": "(wrap"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 283,
+ 284
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 24
+ },
+ "end": {
+ "line": 22,
+ "column": 25
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 284,
+ 286
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 25
+ },
+ "end": {
+ "line": 22,
+ "column": 27
+ }
+ },
+ "value": "in"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 286,
+ 287
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 27
+ },
+ "end": {
+ "line": 22,
+ "column": 28
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 287,
+ 294
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 28
+ },
+ "end": {
+ "line": 22,
+ "column": 35
+ }
+ },
+ "value": "quotes)"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 294,
+ 295
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 35
+ },
+ "end": {
+ "line": 22,
+ "column": 36
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 295,
+ 297
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 36
+ },
+ "end": {
+ "line": 22,
+ "column": 38
+ }
+ },
+ "value": "*/"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 297,
+ 302
+ ],
+ "loc": {
+ "start": {
+ "line": 22,
+ "column": 38
+ },
+ "end": {
+ "line": 23,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 302,
+ 312
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 4
+ },
+ "end": {
+ "line": 23,
+ "column": 14
+ }
+ },
+ "value": "font-size:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 312,
+ 313
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 14
+ },
+ "end": {
+ "line": 23,
+ "column": 15
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 313,
+ 319
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 15
+ },
+ "end": {
+ "line": 23,
+ "column": 21
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 319,
+ 320
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 21
+ },
+ "end": {
+ "line": 23,
+ "column": 22
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 320,
+ 321
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 22
+ },
+ "end": {
+ "line": 23,
+ "column": 23
+ }
+ },
+ "value": "'"
+ },
+ {
+ "type": "Identifier",
+ "value": "font",
+ "start": 321,
+ "end": 325,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 23
+ },
+ "end": {
+ "line": 23,
+ "column": 27
+ }
+ },
+ "range": [
+ 321,
+ 325
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ".",
+ "start": 325,
+ "end": 326,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 27
+ },
+ "end": {
+ "line": 23,
+ "column": 28
+ }
+ },
+ "range": [
+ 325,
+ 326
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "size",
+ "start": 326,
+ "end": 330,
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 28
+ },
+ "end": {
+ "line": 23,
+ "column": 32
+ }
+ },
+ "range": [
+ 326,
+ 330
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 330,
+ 331
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 32
+ },
+ "end": {
+ "line": 23,
+ "column": 33
+ }
+ },
+ "value": "'"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 331,
+ 332
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 33
+ },
+ "end": {
+ "line": 23,
+ "column": 34
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 332,
+ 333
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 34
+ },
+ "end": {
+ "line": 23,
+ "column": 35
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 333,
+ 336
+ ],
+ "loc": {
+ "start": {
+ "line": 23,
+ "column": 35
+ },
+ "end": {
+ "line": 24,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 336,
+ 337
+ ],
+ "loc": {
+ "start": {
+ "line": 24,
+ "column": 2
+ },
+ "end": {
+ "line": 24,
+ "column": 3
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 337,
+ 338
+ ],
+ "loc": {
+ "start": {
+ "line": 24,
+ "column": 3
+ },
+ "end": {
+ "line": 25,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 338,
+ 345
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 0
+ },
+ "end": {
+ "line": 25,
+ "column": 7
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 345,
+ 346
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 7
+ },
+ "end": {
+ "line": 25,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 346,
+ 347
+ ],
+ "loc": {
+ "start": {
+ "line": 25,
+ "column": 8
+ },
+ "end": {
+ "line": 26,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+}
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables01/source.vue b/test/fixtures/document-fragment/style-variables01/source.vue
new file mode 100644
index 00000000..d151be23
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables01/source.vue
@@ -0,0 +1,25 @@
+",
+ "children": []
+ },
+ {
+ "type": "VText",
+ "text": "\n ",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "hello
",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": [
+ {
+ "type": "VAttribute",
+ "text": "class=\"text\"",
+ "children": [
+ {
+ "type": "VIdentifier",
+ "text": "class",
+ "children": []
+ },
+ {
+ "type": "VLiteral",
+ "text": "\"text\"",
+ "children": []
+ }
+ ]
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "hello",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": "
",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ },
+ {
+ "type": "VEndTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n\n",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n\n",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables02/document-fragment.json b/test/fixtures/document-fragment/style-variables02/document-fragment.json
new file mode 100644
index 00000000..3ea5850b
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables02/document-fragment.json
@@ -0,0 +1,1091 @@
+{
+ "type": "VDocumentFragment",
+ "range": [
+ 0,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "children": [
+ {
+ "type": "VElement",
+ "range": [
+ 0,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "name": "style",
+ "rawName": "style",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 7,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": "\n .text {\n color: "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 29,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 24
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 18
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "range": [
+ 36,
+ 41
+ ],
+ "name": "color"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 36,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 18
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "range": [
+ 36,
+ 41
+ ],
+ "name": "color"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 42,
+ 73
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 24
+ },
+ "end": {
+ "line": 6,
+ "column": 15
+ }
+ },
+ "value": ";\n }\n .text {\n font-size: "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 73,
+ 98
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 15
+ },
+ "end": {
+ "line": 6,
+ "column": 40
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 81,
+ "end": 96,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 23
+ },
+ "end": {
+ "line": 6,
+ "column": 38
+ }
+ },
+ "range": [
+ 81,
+ 96
+ ],
+ "object": {
+ "type": "MemberExpression",
+ "start": 81,
+ "end": 91,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 23
+ },
+ "end": {
+ "line": 6,
+ "column": 33
+ }
+ },
+ "range": [
+ 81,
+ 91
+ ],
+ "object": {
+ "type": "Identifier",
+ "start": 81,
+ "end": 86,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 23
+ },
+ "end": {
+ "line": 6,
+ "column": 28
+ }
+ },
+ "range": [
+ 81,
+ 86
+ ],
+ "name": "theme"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 87,
+ "end": 91,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 29
+ },
+ "end": {
+ "line": 6,
+ "column": 33
+ }
+ },
+ "range": [
+ 87,
+ 91
+ ],
+ "name": "font"
+ },
+ "computed": false
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 92,
+ "end": 96,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 34
+ },
+ "end": {
+ "line": 6,
+ "column": 38
+ }
+ },
+ "range": [
+ 92,
+ 96
+ ],
+ "name": "size"
+ },
+ "computed": false
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 81,
+ "end": 86,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 23
+ },
+ "end": {
+ "line": 6,
+ "column": 28
+ }
+ },
+ "range": [
+ 81,
+ 86
+ ],
+ "name": "theme"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 98,
+ 104
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 40
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": ";\n }\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 104,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ }
+ },
+ "variables": [],
+ "style": true
+ },
+ {
+ "type": "VText",
+ "range": [
+ 112,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 6
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 6,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 7,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": ".text"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 15,
+ 16
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 16,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 17,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 22,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "color:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 28,
+ 29
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 29,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 17
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 35,
+ 36
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 18
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Identifier",
+ "value": "color",
+ "start": 36,
+ "end": 41,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 18
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "range": [
+ 36,
+ 41
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 41,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 23
+ },
+ "end": {
+ "line": 3,
+ "column": 24
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 42,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 24
+ },
+ "end": {
+ "line": 3,
+ "column": 25
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 43,
+ 46
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 25
+ },
+ "end": {
+ "line": 4,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 46,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 2
+ },
+ "end": {
+ "line": 4,
+ "column": 3
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 47,
+ 50
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 3
+ },
+ "end": {
+ "line": 5,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 50,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 2
+ },
+ "end": {
+ "line": 5,
+ "column": 7
+ }
+ },
+ "value": ".text"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 55,
+ 56
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 56,
+ 57
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 5,
+ "column": 9
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 57,
+ 62
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 9
+ },
+ "end": {
+ "line": 6,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 62,
+ 72
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 14
+ }
+ },
+ "value": "font-size:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 72,
+ 73
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 14
+ },
+ "end": {
+ "line": 6,
+ "column": 15
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 73,
+ 79
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 15
+ },
+ "end": {
+ "line": 6,
+ "column": 21
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 79,
+ 80
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 21
+ },
+ "end": {
+ "line": 6,
+ "column": 22
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 80,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 22
+ },
+ "end": {
+ "line": 6,
+ "column": 23
+ }
+ },
+ "value": "'"
+ },
+ {
+ "type": "Identifier",
+ "value": "theme",
+ "start": 81,
+ "end": 86,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 23
+ },
+ "end": {
+ "line": 6,
+ "column": 28
+ }
+ },
+ "range": [
+ 81,
+ 86
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ".",
+ "start": 86,
+ "end": 87,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 28
+ },
+ "end": {
+ "line": 6,
+ "column": 29
+ }
+ },
+ "range": [
+ 86,
+ 87
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "font",
+ "start": 87,
+ "end": 91,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 29
+ },
+ "end": {
+ "line": 6,
+ "column": 33
+ }
+ },
+ "range": [
+ 87,
+ 91
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ".",
+ "start": 91,
+ "end": 92,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 33
+ },
+ "end": {
+ "line": 6,
+ "column": 34
+ }
+ },
+ "range": [
+ 91,
+ 92
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "size",
+ "start": 92,
+ "end": 96,
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 34
+ },
+ "end": {
+ "line": 6,
+ "column": 38
+ }
+ },
+ "range": [
+ 92,
+ 96
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 96,
+ 97
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 38
+ },
+ "end": {
+ "line": 6,
+ "column": 39
+ }
+ },
+ "value": "'"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 97,
+ 98
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 39
+ },
+ "end": {
+ "line": 6,
+ "column": 40
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 98,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 40
+ },
+ "end": {
+ "line": 6,
+ "column": 41
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 99,
+ 102
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 41
+ },
+ "end": {
+ "line": 7,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 102,
+ 103
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 2
+ },
+ "end": {
+ "line": 7,
+ "column": 3
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 103,
+ 104
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 3
+ },
+ "end": {
+ "line": 8,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 104,
+ 111
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 0
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 111,
+ 112
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 112,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+}
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables02/source.vue b/test/fixtures/document-fragment/style-variables02/source.vue
new file mode 100644
index 00000000..f8bce52f
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables02/source.vue
@@ -0,0 +1,8 @@
+
diff --git a/test/fixtures/document-fragment/style-variables02/token-ranges.json b/test/fixtures/document-fragment/style-variables02/token-ranges.json
new file mode 100644
index 00000000..eafcce25
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables02/token-ranges.json
@@ -0,0 +1,42 @@
+[
+ "",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables02/tree.json b/test/fixtures/document-fragment/style-variables02/tree.json
new file mode 100644
index 00000000..2a7d9e06
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables02/tree.json
@@ -0,0 +1,88 @@
+[
+ {
+ "type": "VDocumentFragment",
+ "text": "\n",
+ "children": [
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables03/document-fragment.json b/test/fixtures/document-fragment/style-variables03/document-fragment.json
new file mode 100644
index 00000000..8f6b3606
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables03/document-fragment.json
@@ -0,0 +1,1066 @@
+{
+ "type": "VDocumentFragment",
+ "range": [
+ 0,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ },
+ "children": [
+ {
+ "type": "VElement",
+ "range": [
+ 0,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "name": "style",
+ "rawName": "style",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 7,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "\n .text {\n color:"
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 28,
+ 41
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "range": [
+ 35,
+ 40
+ ],
+ "name": "color"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 35,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "range": [
+ 35,
+ 40
+ ],
+ "name": "color"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 41,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 23
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": ";\n }\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 47,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ }
+ },
+ "variables": [],
+ "style": true
+ },
+ {
+ "type": "VText",
+ "range": [
+ 55,
+ 57
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "VElement",
+ "range": [
+ 57,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ },
+ "name": "style",
+ "rawName": "style",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 57,
+ 71
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "selfClosing": false,
+ "attributes": [
+ {
+ "type": "VAttribute",
+ "range": [
+ 64,
+ 70
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 7
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "directive": false,
+ "key": {
+ "type": "VIdentifier",
+ "range": [
+ 64,
+ 70
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 7
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "name": "scoped",
+ "rawName": "scoped"
+ },
+ "value": null
+ }
+ ]
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 71,
+ 93
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "value": "\n .text {\n color: "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 93,
+ 106
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 9,
+ "column": 24
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 100,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 18
+ },
+ "end": {
+ "line": 9,
+ "column": 23
+ }
+ },
+ "range": [
+ 100,
+ 105
+ ],
+ "name": "color"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 100,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 18
+ },
+ "end": {
+ "line": 9,
+ "column": 23
+ }
+ },
+ "range": [
+ 100,
+ 105
+ ],
+ "name": "color"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 106,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 24
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": ";}\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 109,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ }
+ },
+ "variables": [],
+ "style": true
+ }
+ ],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 6
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 6,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 7,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 10,
+ 15
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 7
+ }
+ },
+ "value": ".text"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 15,
+ 16
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 16,
+ 17
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 2,
+ "column": 9
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 17,
+ 22
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 9
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 22,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "color:"
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 28,
+ 34
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 16
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 34,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 16
+ },
+ "end": {
+ "line": 3,
+ "column": 17
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Identifier",
+ "value": "color",
+ "start": 35,
+ "end": 40,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 22
+ }
+ },
+ "range": [
+ 35,
+ 40
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 40,
+ 41
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 22
+ },
+ "end": {
+ "line": 3,
+ "column": 23
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 41,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 23
+ },
+ "end": {
+ "line": 3,
+ "column": 24
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 42,
+ 45
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 24
+ },
+ "end": {
+ "line": 4,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 45,
+ 46
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 2
+ },
+ "end": {
+ "line": 4,
+ "column": 3
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 46,
+ 47
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 3
+ },
+ "end": {
+ "line": 5,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 47,
+ 54
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 0
+ },
+ "end": {
+ "line": 5,
+ "column": 7
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 54,
+ 55
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 7
+ },
+ "end": {
+ "line": 5,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 55,
+ 57
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 0
+ }
+ },
+ "value": "\n\n"
+ },
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 57,
+ 63
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 0
+ },
+ "end": {
+ "line": 7,
+ "column": 6
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLIdentifier",
+ "range": [
+ 64,
+ 70
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 7
+ },
+ "end": {
+ "line": 7,
+ "column": 13
+ }
+ },
+ "value": "scoped"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 70,
+ 71
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 13
+ },
+ "end": {
+ "line": 7,
+ "column": 14
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 71,
+ 74
+ ],
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 14
+ },
+ "end": {
+ "line": 8,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 74,
+ 79
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 2
+ },
+ "end": {
+ "line": 8,
+ "column": 7
+ }
+ },
+ "value": ".text"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 79,
+ 80
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 7
+ },
+ "end": {
+ "line": 8,
+ "column": 8
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 80,
+ 81
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 9
+ }
+ },
+ "value": "{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 81,
+ 86
+ ],
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 9
+ },
+ "end": {
+ "line": 9,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 86,
+ 92
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 4
+ },
+ "end": {
+ "line": 9,
+ "column": 10
+ }
+ },
+ "value": "color:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 92,
+ 93
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 10
+ },
+ "end": {
+ "line": 9,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 93,
+ 99
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 11
+ },
+ "end": {
+ "line": 9,
+ "column": 17
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 99,
+ 100
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 17
+ },
+ "end": {
+ "line": 9,
+ "column": 18
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Identifier",
+ "value": "color",
+ "start": 100,
+ "end": 105,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 18
+ },
+ "end": {
+ "line": 9,
+ "column": 23
+ }
+ },
+ "range": [
+ 100,
+ 105
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 105,
+ 106
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 23
+ },
+ "end": {
+ "line": 9,
+ "column": 24
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 106,
+ 108
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 24
+ },
+ "end": {
+ "line": 9,
+ "column": 26
+ }
+ },
+ "value": ";}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 108,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 26
+ },
+ "end": {
+ "line": 10,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 109,
+ 116
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 0
+ },
+ "end": {
+ "line": 10,
+ "column": 7
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 116,
+ 117
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 7
+ },
+ "end": {
+ "line": 10,
+ "column": 8
+ }
+ },
+ "value": ""
+ }
+ ],
+ "comments": [],
+ "errors": []
+}
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables03/source.vue b/test/fixtures/document-fragment/style-variables03/source.vue
new file mode 100644
index 00000000..2ed3c09d
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables03/source.vue
@@ -0,0 +1,10 @@
+
+
+
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables03/token-ranges.json b/test/fixtures/document-fragment/style-variables03/token-ranges.json
new file mode 100644
index 00000000..40e5942a
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables03/token-ranges.json
@@ -0,0 +1,39 @@
+[
+ "",
+ "\n\n",
+ ""
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables03/tree.json b/test/fixtures/document-fragment/style-variables03/tree.json
new file mode 100644
index 00000000..83907c09
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables03/tree.json
@@ -0,0 +1,99 @@
+[
+ {
+ "type": "VDocumentFragment",
+ "text": "\n\n",
+ "children": [
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n\n",
+ "children": []
+ },
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables04/document-fragment.json b/test/fixtures/document-fragment/style-variables04/document-fragment.json
new file mode 100644
index 00000000..e9beb1c0
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables04/document-fragment.json
@@ -0,0 +1,399 @@
+{
+ "type": "VDocumentFragment",
+ "range": [
+ 0,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "children": [
+ {
+ "type": "VElement",
+ "range": [
+ 0,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "name": "style",
+ "rawName": "style",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 7,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "value": ".text{color:"
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 19,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "range": [
+ 26,
+ 31
+ ],
+ "name": "color"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "range": [
+ 26,
+ 31
+ ],
+ "name": "color"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 32,
+ 34
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": ";}"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 34,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ }
+ },
+ "variables": [],
+ "style": true
+ },
+ {
+ "type": "VText",
+ "range": [
+ 42,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 6
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 6,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 7,
+ 19
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 1,
+ "column": 19
+ }
+ },
+ "value": ".text{color:"
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 19,
+ 25
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 19
+ },
+ "end": {
+ "line": 1,
+ "column": 25
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 25,
+ 26
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 25
+ },
+ "end": {
+ "line": 1,
+ "column": 26
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Identifier",
+ "value": "color",
+ "start": 26,
+ "end": 31,
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 26
+ },
+ "end": {
+ "line": 1,
+ "column": 31
+ }
+ },
+ "range": [
+ 26,
+ 31
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 31,
+ 32
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 31
+ },
+ "end": {
+ "line": 1,
+ "column": 32
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 32,
+ 34
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 32
+ },
+ "end": {
+ "line": 1,
+ "column": 34
+ }
+ },
+ "value": ";}"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 34,
+ 41
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 34
+ },
+ "end": {
+ "line": 1,
+ "column": 41
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 41,
+ 42
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 41
+ },
+ "end": {
+ "line": 1,
+ "column": 42
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 42,
+ 43
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 42
+ },
+ "end": {
+ "line": 2,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+}
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables04/source.vue b/test/fixtures/document-fragment/style-variables04/source.vue
new file mode 100644
index 00000000..71127427
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables04/source.vue
@@ -0,0 +1 @@
+
diff --git a/test/fixtures/document-fragment/style-variables04/token-ranges.json b/test/fixtures/document-fragment/style-variables04/token-ranges.json
new file mode 100644
index 00000000..9068022d
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables04/token-ranges.json
@@ -0,0 +1,13 @@
+[
+ "",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables04/tree.json b/test/fixtures/document-fragment/style-variables04/tree.json
new file mode 100644
index 00000000..de0f73bd
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables04/tree.json
@@ -0,0 +1,50 @@
+[
+ {
+ "type": "VDocumentFragment",
+ "text": "\n",
+ "children": [
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables05/document-fragment.json b/test/fixtures/document-fragment/style-variables05/document-fragment.json
new file mode 100644
index 00000000..f14b915c
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables05/document-fragment.json
@@ -0,0 +1,1555 @@
+{
+ "type": "VDocumentFragment",
+ "range": [
+ 0,
+ 246
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 13,
+ "column": 0
+ }
+ },
+ "children": [
+ {
+ "type": "VElement",
+ "range": [
+ 0,
+ 245
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 8
+ }
+ },
+ "name": "style",
+ "rawName": "style",
+ "namespace": "http://www.w3.org/1999/xhtml",
+ "startTag": {
+ "type": "VStartTag",
+ "range": [
+ 0,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "selfClosing": false,
+ "attributes": []
+ },
+ "children": [
+ {
+ "type": "VText",
+ "range": [
+ 7,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": "\n .text{\n color: "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 28,
+ 45
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 28
+ }
+ },
+ "expression": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 20
+ },
+ "end": {
+ "line": 3,
+ "column": 25
+ }
+ },
+ "range": [
+ 37,
+ 42
+ ],
+ "name": "color"
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 37,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 20
+ },
+ "end": {
+ "line": 3,
+ "column": 25
+ }
+ },
+ "range": [
+ 37,
+ 42
+ ],
+ "name": "color"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 45,
+ 62
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 28
+ },
+ "end": {
+ "line": 4,
+ "column": 15
+ }
+ },
+ "value": ";\n font-size: "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 62,
+ 89
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 15
+ },
+ "end": {
+ "line": 4,
+ "column": 42
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 74,
+ "end": 83,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 27
+ },
+ "end": {
+ "line": 4,
+ "column": 36
+ }
+ },
+ "range": [
+ 74,
+ 83
+ ],
+ "object": {
+ "type": "Identifier",
+ "start": 74,
+ "end": 78,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 27
+ },
+ "end": {
+ "line": 4,
+ "column": 31
+ }
+ },
+ "range": [
+ 74,
+ 78
+ ],
+ "name": "font"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 79,
+ "end": 83,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 32
+ },
+ "end": {
+ "line": 4,
+ "column": 36
+ }
+ },
+ "range": [
+ 79,
+ 83
+ ],
+ "name": "size"
+ },
+ "computed": false
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 74,
+ "end": 78,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 27
+ },
+ "end": {
+ "line": 4,
+ "column": 31
+ }
+ },
+ "range": [
+ 74,
+ 78
+ ],
+ "name": "font"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 89,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 42
+ },
+ "end": {
+ "line": 5,
+ "column": 22
+ }
+ },
+ "value": ";\n border-color: /**/"
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 113,
+ 148
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 22
+ },
+ "end": {
+ "line": 5,
+ "column": 57
+ }
+ },
+ "expression": {
+ "type": "CallExpression",
+ "start": 125,
+ "end": 143,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 34
+ },
+ "end": {
+ "line": 5,
+ "column": 52
+ }
+ },
+ "range": [
+ 125,
+ 143
+ ],
+ "callee": {
+ "type": "Identifier",
+ "start": 125,
+ "end": 131,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 34
+ },
+ "end": {
+ "line": 5,
+ "column": 40
+ }
+ },
+ "range": [
+ 125,
+ 131
+ ],
+ "name": "border"
+ },
+ "arguments": [
+ {
+ "type": "Literal",
+ "start": 134,
+ "end": 141,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 43
+ },
+ "end": {
+ "line": 5,
+ "column": 50
+ }
+ },
+ "range": [
+ 134,
+ 141
+ ],
+ "value": "color",
+ "raw": "'color'"
+ }
+ ]
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 125,
+ "end": 131,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 34
+ },
+ "end": {
+ "line": 5,
+ "column": 40
+ }
+ },
+ "range": [
+ 125,
+ 131
+ ],
+ "name": "border"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 148,
+ 173
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 57
+ },
+ "end": {
+ "line": 6,
+ "column": 22
+ }
+ },
+ "value": ";;\n background-color: "
+ },
+ {
+ "type": "VExpressionContainer",
+ "range": [
+ 173,
+ 231
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 22
+ },
+ "end": {
+ "line": 10,
+ "column": 5
+ }
+ },
+ "expression": {
+ "type": "MemberExpression",
+ "start": 191,
+ "end": 225,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "range": [
+ 191,
+ 225
+ ],
+ "object": {
+ "type": "Identifier",
+ "start": 191,
+ "end": 201,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 18
+ }
+ },
+ "range": [
+ 191,
+ 201
+ ],
+ "name": "background"
+ },
+ "property": {
+ "type": "Identifier",
+ "start": 220,
+ "end": 225,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "range": [
+ 220,
+ 225
+ ],
+ "name": "color"
+ },
+ "computed": false
+ },
+ "references": [
+ {
+ "id": {
+ "type": "Identifier",
+ "start": 191,
+ "end": 201,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 18
+ }
+ },
+ "range": [
+ 191,
+ 201
+ ],
+ "name": "background"
+ },
+ "mode": "r"
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "range": [
+ 231,
+ 237
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 5
+ },
+ "end": {
+ "line": 12,
+ "column": 0
+ }
+ },
+ "value": ";\n }\n"
+ }
+ ],
+ "endTag": {
+ "type": "VEndTag",
+ "range": [
+ 237,
+ 245
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 8
+ }
+ }
+ },
+ "variables": [],
+ "style": true
+ },
+ {
+ "type": "VText",
+ "range": [
+ 245,
+ 246
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 8
+ },
+ "end": {
+ "line": 13,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "tokens": [
+ {
+ "type": "HTMLTagOpen",
+ "range": [
+ 0,
+ 6
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 0
+ },
+ "end": {
+ "line": 1,
+ "column": 6
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 6,
+ 7
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 6
+ },
+ "end": {
+ "line": 1,
+ "column": 7
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 7,
+ 10
+ ],
+ "loc": {
+ "start": {
+ "line": 1,
+ "column": 7
+ },
+ "end": {
+ "line": 2,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 10,
+ 16
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 2
+ },
+ "end": {
+ "line": 2,
+ "column": 8
+ }
+ },
+ "value": ".text{"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 16,
+ 21
+ ],
+ "loc": {
+ "start": {
+ "line": 2,
+ "column": 8
+ },
+ "end": {
+ "line": 3,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 21,
+ 27
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 4
+ },
+ "end": {
+ "line": 3,
+ "column": 10
+ }
+ },
+ "value": "color:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 27,
+ 28
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 10
+ },
+ "end": {
+ "line": 3,
+ "column": 11
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 28,
+ 34
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 11
+ },
+ "end": {
+ "line": 3,
+ "column": 17
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 34,
+ 35
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 17
+ },
+ "end": {
+ "line": 3,
+ "column": 18
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Identifier",
+ "value": "color",
+ "start": 37,
+ "end": 42,
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 20
+ },
+ "end": {
+ "line": 3,
+ "column": 25
+ }
+ },
+ "range": [
+ 37,
+ 42
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 44,
+ 45
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 27
+ },
+ "end": {
+ "line": 3,
+ "column": 28
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 45,
+ 46
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 28
+ },
+ "end": {
+ "line": 3,
+ "column": 29
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 46,
+ 51
+ ],
+ "loc": {
+ "start": {
+ "line": 3,
+ "column": 29
+ },
+ "end": {
+ "line": 4,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 51,
+ 61
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 4
+ },
+ "end": {
+ "line": 4,
+ "column": 14
+ }
+ },
+ "value": "font-size:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 61,
+ 62
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 14
+ },
+ "end": {
+ "line": 4,
+ "column": 15
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 62,
+ 68
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 15
+ },
+ "end": {
+ "line": 4,
+ "column": 21
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 68,
+ 69
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 21
+ },
+ "end": {
+ "line": 4,
+ "column": 22
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 71,
+ 72
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 24
+ },
+ "end": {
+ "line": 4,
+ "column": 25
+ }
+ },
+ "value": "'"
+ },
+ {
+ "type": "Identifier",
+ "value": "font",
+ "start": 74,
+ "end": 78,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 27
+ },
+ "end": {
+ "line": 4,
+ "column": 31
+ }
+ },
+ "range": [
+ 74,
+ 78
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ".",
+ "start": 78,
+ "end": 79,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 31
+ },
+ "end": {
+ "line": 4,
+ "column": 32
+ }
+ },
+ "range": [
+ 78,
+ 79
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "size",
+ "start": 79,
+ "end": 83,
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 32
+ },
+ "end": {
+ "line": 4,
+ "column": 36
+ }
+ },
+ "range": [
+ 79,
+ 83
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 85,
+ 86
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 38
+ },
+ "end": {
+ "line": 4,
+ "column": 39
+ }
+ },
+ "value": "'"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 88,
+ 89
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 41
+ },
+ "end": {
+ "line": 4,
+ "column": 42
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 89,
+ 90
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 42
+ },
+ "end": {
+ "line": 4,
+ "column": 43
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 90,
+ 95
+ ],
+ "loc": {
+ "start": {
+ "line": 4,
+ "column": 43
+ },
+ "end": {
+ "line": 5,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 95,
+ 108
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 4
+ },
+ "end": {
+ "line": 5,
+ "column": 17
+ }
+ },
+ "value": "border-color:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 108,
+ 109
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 17
+ },
+ "end": {
+ "line": 5,
+ "column": 18
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 109,
+ 113
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 18
+ },
+ "end": {
+ "line": 5,
+ "column": 22
+ }
+ },
+ "value": "/**/"
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 113,
+ 119
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 22
+ },
+ "end": {
+ "line": 5,
+ "column": 28
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 119,
+ 120
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 28
+ },
+ "end": {
+ "line": 5,
+ "column": 29
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 122,
+ 123
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 31
+ },
+ "end": {
+ "line": 5,
+ "column": 32
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "Identifier",
+ "value": "border",
+ "start": 125,
+ "end": 131,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 34
+ },
+ "end": {
+ "line": 5,
+ "column": 40
+ }
+ },
+ "range": [
+ 125,
+ 131
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": "(",
+ "start": 132,
+ "end": 133,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 41
+ },
+ "end": {
+ "line": 5,
+ "column": 42
+ }
+ },
+ "range": [
+ 132,
+ 133
+ ]
+ },
+ {
+ "type": "String",
+ "value": "'color'",
+ "start": 134,
+ "end": 141,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 43
+ },
+ "end": {
+ "line": 5,
+ "column": 50
+ }
+ },
+ "range": [
+ 134,
+ 141
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ")",
+ "start": 142,
+ "end": 143,
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 51
+ },
+ "end": {
+ "line": 5,
+ "column": 52
+ }
+ },
+ "range": [
+ 142,
+ 143
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 144,
+ 145
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 53
+ },
+ "end": {
+ "line": 5,
+ "column": 54
+ }
+ },
+ "value": "\""
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 147,
+ 148
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 56
+ },
+ "end": {
+ "line": 5,
+ "column": 57
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 148,
+ 150
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 57
+ },
+ "end": {
+ "line": 5,
+ "column": 59
+ }
+ },
+ "value": ";;"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 150,
+ 155
+ ],
+ "loc": {
+ "start": {
+ "line": 5,
+ "column": 59
+ },
+ "end": {
+ "line": 6,
+ "column": 4
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 155,
+ 172
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 4
+ },
+ "end": {
+ "line": 6,
+ "column": 21
+ }
+ },
+ "value": "background-color:"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 172,
+ 173
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 21
+ },
+ "end": {
+ "line": 6,
+ "column": 22
+ }
+ },
+ "value": " "
+ },
+ {
+ "type": "HTMLText",
+ "range": [
+ 173,
+ 179
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 22
+ },
+ "end": {
+ "line": 6,
+ "column": 28
+ }
+ },
+ "value": "v-bind"
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 179,
+ 180
+ ],
+ "loc": {
+ "start": {
+ "line": 6,
+ "column": 28
+ },
+ "end": {
+ "line": 6,
+ "column": 29
+ }
+ },
+ "value": "("
+ },
+ {
+ "type": "Identifier",
+ "value": "background",
+ "start": 191,
+ "end": 201,
+ "loc": {
+ "start": {
+ "line": 7,
+ "column": 8
+ },
+ "end": {
+ "line": 7,
+ "column": 18
+ }
+ },
+ "range": [
+ 191,
+ 201
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "value": ".",
+ "start": 210,
+ "end": 211,
+ "loc": {
+ "start": {
+ "line": 8,
+ "column": 8
+ },
+ "end": {
+ "line": 8,
+ "column": 9
+ }
+ },
+ "range": [
+ 210,
+ 211
+ ]
+ },
+ {
+ "type": "Identifier",
+ "value": "color",
+ "start": 220,
+ "end": 225,
+ "loc": {
+ "start": {
+ "line": 9,
+ "column": 8
+ },
+ "end": {
+ "line": 9,
+ "column": 13
+ }
+ },
+ "range": [
+ 220,
+ 225
+ ]
+ },
+ {
+ "type": "Punctuator",
+ "range": [
+ 230,
+ 231
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 4
+ },
+ "end": {
+ "line": 10,
+ "column": 5
+ }
+ },
+ "value": ")"
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 231,
+ 232
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 5
+ },
+ "end": {
+ "line": 10,
+ "column": 6
+ }
+ },
+ "value": ";"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 232,
+ 235
+ ],
+ "loc": {
+ "start": {
+ "line": 10,
+ "column": 6
+ },
+ "end": {
+ "line": 11,
+ "column": 2
+ }
+ },
+ "value": "\n "
+ },
+ {
+ "type": "HTMLRawText",
+ "range": [
+ 235,
+ 236
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 2
+ },
+ "end": {
+ "line": 11,
+ "column": 3
+ }
+ },
+ "value": "}"
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 236,
+ 237
+ ],
+ "loc": {
+ "start": {
+ "line": 11,
+ "column": 3
+ },
+ "end": {
+ "line": 12,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ },
+ {
+ "type": "HTMLEndTagOpen",
+ "range": [
+ 237,
+ 244
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 0
+ },
+ "end": {
+ "line": 12,
+ "column": 7
+ }
+ },
+ "value": "style"
+ },
+ {
+ "type": "HTMLTagClose",
+ "range": [
+ 244,
+ 245
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 7
+ },
+ "end": {
+ "line": 12,
+ "column": 8
+ }
+ },
+ "value": ""
+ },
+ {
+ "type": "HTMLWhitespace",
+ "range": [
+ 245,
+ 246
+ ],
+ "loc": {
+ "start": {
+ "line": 12,
+ "column": 8
+ },
+ "end": {
+ "line": 13,
+ "column": 0
+ }
+ },
+ "value": "\n"
+ }
+ ],
+ "comments": [],
+ "errors": []
+}
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables05/source.vue b/test/fixtures/document-fragment/style-variables05/source.vue
new file mode 100644
index 00000000..c62a7b36
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables05/source.vue
@@ -0,0 +1,12 @@
+
diff --git a/test/fixtures/document-fragment/style-variables05/token-ranges.json b/test/fixtures/document-fragment/style-variables05/token-ranges.json
new file mode 100644
index 00000000..c61ec5cd
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables05/token-ranges.json
@@ -0,0 +1,56 @@
+[
+ "",
+ "\n"
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/style-variables05/tree.json b/test/fixtures/document-fragment/style-variables05/tree.json
new file mode 100644
index 00000000..1fbd3b38
--- /dev/null
+++ b/test/fixtures/document-fragment/style-variables05/tree.json
@@ -0,0 +1,131 @@
+[
+ {
+ "type": "VDocumentFragment",
+ "text": "\n",
+ "children": [
+ {
+ "type": "VElement",
+ "text": "",
+ "children": [
+ {
+ "type": "VStartTag",
+ "text": "",
+ "children": []
+ }
+ ]
+ },
+ {
+ "type": "VText",
+ "text": "\n",
+ "children": []
+ }
+ ]
+ }
+]
\ No newline at end of file
diff --git a/test/fixtures/document-fragment/template-tag-is-absent/document-fragment.json b/test/fixtures/document-fragment/template-tag-is-absent/document-fragment.json
index 66170fd2..f51aedc7 100644
--- a/test/fixtures/document-fragment/template-tag-is-absent/document-fragment.json
+++ b/test/fixtures/document-fragment/template-tag-is-absent/document-fragment.json
@@ -1152,7 +1152,8 @@
}
}
},
- "variables": []
+ "variables": [],
+ "style": true
}
],
"tokens": [
diff --git a/test/fixtures/document-fragment/template-tag-is-present/document-fragment.json b/test/fixtures/document-fragment/template-tag-is-present/document-fragment.json
index 52c22960..6a148a10 100644
--- a/test/fixtures/document-fragment/template-tag-is-present/document-fragment.json
+++ b/test/fixtures/document-fragment/template-tag-is-present/document-fragment.json
@@ -280,7 +280,8 @@
}
}
},
- "variables": []
+ "variables": [],
+ "style": true
}
],
"tokens": [