Debian Codegraph @

packages/babel-parser/test/fixtures/tokens/template-string/invalid-octal/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":17,"index":23}},
4 "errors": [
5 "SyntaxError: Invalid escape sequence in template. (1:2)",
6 "SyntaxError: Invalid escape sequence in template. (2:2)",
7 "SyntaxError: Invalid escape sequence in template. (2:8)",
8 "SyntaxError: Invalid escape sequence in template. (2:14)"
9 ],
10 "program": {
11 "type": "Program",
12 "start":0,"end":23,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":17,"index":23}},
13 "sourceType": "script",
14 "interpreter": null,
15 "body": [
16 {
17 "type": "ExpressionStatement",
18 "start":0,"end":5,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":5,"index":5}},
19 "expression": {
20 "type": "TemplateLiteral",
21 "start":0,"end":4,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":4,"index":4}},
22 "expressions": [],
23 "quasis": [
24 {
25 "type": "TemplateElement",
26 "start":1,"end":3,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":3,"index":3}},
27 "value": {
28 "raw": "\\1",
29 "cooked": null
30 },
31 "tail": true
32 }
33 ]
34 }
35 },
36 {
37 "type": "ExpressionStatement",
38 "start":6,"end":23,"loc":{"start":{"line":2,"column":0,"index":6},"end":{"line":2,"column":17,"index":23}},
39 "expression": {
40 "type": "TemplateLiteral",
41 "start":6,"end":22,"loc":{"start":{"line":2,"column":0,"index":6},"end":{"line":2,"column":16,"index":22}},
42 "expressions": [
43 {
44 "type": "Identifier",
45 "start":11,"end":12,"loc":{"start":{"line":2,"column":5,"index":11},"end":{"line":2,"column":6,"index":12},"identifierName":"x"},
46 "name": "x"
47 },
48 {
49 "type": "Identifier",
50 "start":17,"end":18,"loc":{"start":{"line":2,"column":11,"index":17},"end":{"line":2,"column":12,"index":18},"identifierName":"y"},
51 "name": "y"
52 }
53 ],
54 "quasis": [
55 {
56 "type": "TemplateElement",
57 "start":7,"end":9,"loc":{"start":{"line":2,"column":1,"index":7},"end":{"line":2,"column":3,"index":9}},
58 "value": {
59 "raw": "\\1",
60 "cooked": null
61 },
62 "tail": false
63 },
64 {
65 "type": "TemplateElement",
66 "start":13,"end":15,"loc":{"start":{"line":2,"column":7,"index":13},"end":{"line":2,"column":9,"index":15}},
67 "value": {
68 "raw": "\\2",
69 "cooked": null
70 },
71 "tail": false
72 },
73 {
74 "type": "TemplateElement",
75 "start":19,"end":21,"loc":{"start":{"line":2,"column":13,"index":19},"end":{"line":2,"column":15,"index":21}},
76 "value": {
77 "raw": "\\3",
78 "cooked": null
79 },
80 "tail": true
81 }
82 ]
83 }
84 }
85 ],
86 "directives": []
87 },
88 "tokens": [
89 {
90 "type": {
91 "label": "...`",
92 "beforeExpr": false,
93 "startsExpr": true,
94 "rightAssociative": false,
95 "isLoop": false,
96 "isAssign": false,
97 "prefix": false,
98 "postfix": false,
99 "binop": null
100 },
101 "value": null,
102 "start":0,"end":4,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":4,"index":4}}
103 },
104 {
105 "type": {
106 "label": ";",
107 "beforeExpr": true,
108 "startsExpr": false,
109 "rightAssociative": false,
110 "isLoop": false,
111 "isAssign": false,
112 "prefix": false,
113 "postfix": false,
114 "binop": null
115 },
116 "start":4,"end":5,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":5,"index":5}}
117 },
118 {
119 "type": {
120 "label": "...${",
121 "beforeExpr": true,
122 "startsExpr": true,
123 "rightAssociative": false,
124 "isLoop": false,
125 "isAssign": false,
126 "prefix": false,
127 "postfix": false,
128 "binop": null
129 },
130 "value": null,
131 "start":6,"end":11,"loc":{"start":{"line":2,"column":0,"index":6},"end":{"line":2,"column":5,"index":11}}
132 },
133 {
134 "type": {
135 "label": "name",
136 "beforeExpr": false,
137 "startsExpr": true,
138 "rightAssociative": false,
139 "isLoop": false,
140 "isAssign": false,
141 "prefix": false,
142 "postfix": false,
143 "binop": null
144 },
145 "value": "x",
146 "start":11,"end":12,"loc":{"start":{"line":2,"column":5,"index":11},"end":{"line":2,"column":6,"index":12}}
147 },
148 {
149 "type": {
150 "label": "...${",
151 "beforeExpr": true,
152 "startsExpr": true,
153 "rightAssociative": false,
154 "isLoop": false,
155 "isAssign": false,
156 "prefix": false,
157 "postfix": false,
158 "binop": null
159 },
160 "value": null,
161 "start":12,"end":17,"loc":{"start":{"line":2,"column":6,"index":12},"end":{"line":2,"column":11,"index":17}}
162 },
163 {
164 "type": {
165 "label": "name",
166 "beforeExpr": false,
167 "startsExpr": true,
168 "rightAssociative": false,
169 "isLoop": false,
170 "isAssign": false,
171 "prefix": false,
172 "postfix": false,
173 "binop": null
174 },
175 "value": "y",
176 "start":17,"end":18,"loc":{"start":{"line":2,"column":11,"index":17},"end":{"line":2,"column":12,"index":18}}
177 },
178 {
179 "type": {
180 "label": "...`",
181 "beforeExpr": false,
182 "startsExpr": true,
183 "rightAssociative": false,
184 "isLoop": false,
185 "isAssign": false,
186 "prefix": false,
187 "postfix": false,
188 "binop": null
189 },
190 "value": null,
191 "start":18,"end":22,"loc":{"start":{"line":2,"column":12,"index":18},"end":{"line":2,"column":16,"index":22}}
192 },
193 {
194 "type": {
195 "label": ";",
196 "beforeExpr": true,
197 "startsExpr": false,
198 "rightAssociative": false,
199 "isLoop": false,
200 "isAssign": false,
201 "prefix": false,
202 "postfix": false,
203 "binop": null
204 },
205 "start":22,"end":23,"loc":{"start":{"line":2,"column":16,"index":22},"end":{"line":2,"column":17,"index":23}}
206 },
207 {
208 "type": {
209 "label": "eof",
210 "beforeExpr": false,
211 "startsExpr": false,
212 "rightAssociative": false,
213 "isLoop": false,
214 "isAssign": false,
215 "prefix": false,
216 "postfix": false,
217 "binop": null
218 },
219 "start":23,"end":23,"loc":{"start":{"line":2,"column":17,"index":23},"end":{"line":2,"column":17,"index":23}}
220 }
221 ]
222 }