Debian Codegraph @

packages/babel-parser/test/fixtures/tokens/template-string-babel-7/invalid-unicode-escape-codepoint/output.json

raw symbols SCIP
1 {
2 "type": "File",
3 "start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":26,"index":35}},
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:11)",
8 "SyntaxError: Invalid escape sequence in template. (2:20)"
9 ],
10 "program": {
11 "type": "Program",
12 "start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":26,"index":35}},
13 "sourceType": "script",
14 "interpreter": null,
15 "body": [
16 {
17 "type": "ExpressionStatement",
18 "start":0,"end":8,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":8,"index":8}},
19 "expression": {
20 "type": "TemplateLiteral",
21 "start":0,"end":7,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":7,"index":7}},
22 "expressions": [],
23 "quasis": [
24 {
25 "type": "TemplateElement",
26 "start":1,"end":6,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":6,"index":6}},
27 "value": {
28 "raw": "\\u{g}",
29 "cooked": null
30 },
31 "tail": true
32 }
33 ]
34 }
35 },
36 {
37 "type": "ExpressionStatement",
38 "start":9,"end":35,"loc":{"start":{"line":2,"column":0,"index":9},"end":{"line":2,"column":26,"index":35}},
39 "expression": {
40 "type": "TemplateLiteral",
41 "start":9,"end":34,"loc":{"start":{"line":2,"column":0,"index":9},"end":{"line":2,"column":25,"index":34}},
42 "expressions": [
43 {
44 "type": "Identifier",
45 "start":17,"end":18,"loc":{"start":{"line":2,"column":8,"index":17},"end":{"line":2,"column":9,"index":18},"identifierName":"x"},
46 "name": "x"
47 },
48 {
49 "type": "Identifier",
50 "start":26,"end":27,"loc":{"start":{"line":2,"column":17,"index":26},"end":{"line":2,"column":18,"index":27},"identifierName":"y"},
51 "name": "y"
52 }
53 ],
54 "quasis": [
55 {
56 "type": "TemplateElement",
57 "start":10,"end":15,"loc":{"start":{"line":2,"column":1,"index":10},"end":{"line":2,"column":6,"index":15}},
58 "value": {
59 "raw": "\\u{g}",
60 "cooked": null
61 },
62 "tail": false
63 },
64 {
65 "type": "TemplateElement",
66 "start":19,"end":24,"loc":{"start":{"line":2,"column":10,"index":19},"end":{"line":2,"column":15,"index":24}},
67 "value": {
68 "raw": "\\u{g}",
69 "cooked": null
70 },
71 "tail": false
72 },
73 {
74 "type": "TemplateElement",
75 "start":28,"end":33,"loc":{"start":{"line":2,"column":19,"index":28},"end":{"line":2,"column":24,"index":33}},
76 "value": {
77 "raw": "\\u{g}",
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": "`",
102 "start":0,"end":1,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":1,"index":1}}
103 },
104 {
105 "type": {
106 "label": "template",
107 "beforeExpr": false,
108 "startsExpr": false,
109 "rightAssociative": false,
110 "isLoop": false,
111 "isAssign": false,
112 "prefix": false,
113 "postfix": false,
114 "binop": null,
115 "updateContext": null
116 },
117 "value": null,
118 "start":1,"end":6,"loc":{"start":{"line":1,"column":1,"index":1},"end":{"line":1,"column":6,"index":6}}
119 },
120 {
121 "type": {
122 "label": "`",
123 "beforeExpr": false,
124 "startsExpr": true,
125 "rightAssociative": false,
126 "isLoop": false,
127 "isAssign": false,
128 "prefix": false,
129 "postfix": false,
130 "binop": null
131 },
132 "value": "`",
133 "start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7}}
134 },
135 {
136 "type": {
137 "label": ";",
138 "beforeExpr": true,
139 "startsExpr": false,
140 "rightAssociative": false,
141 "isLoop": false,
142 "isAssign": false,
143 "prefix": false,
144 "postfix": false,
145 "binop": null,
146 "updateContext": null
147 },
148 "start":7,"end":8,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":8,"index":8}}
149 },
150 {
151 "type": {
152 "label": "`",
153 "beforeExpr": false,
154 "startsExpr": true,
155 "rightAssociative": false,
156 "isLoop": false,
157 "isAssign": false,
158 "prefix": false,
159 "postfix": false,
160 "binop": null
161 },
162 "value": "`",
163 "start":9,"end":10,"loc":{"start":{"line":2,"column":0,"index":9},"end":{"line":2,"column":1,"index":10}}
164 },
165 {
166 "type": {
167 "label": "template",
168 "beforeExpr": false,
169 "startsExpr": false,
170 "rightAssociative": false,
171 "isLoop": false,
172 "isAssign": false,
173 "prefix": false,
174 "postfix": false,
175 "binop": null,
176 "updateContext": null
177 },
178 "value": null,
179 "start":10,"end":15,"loc":{"start":{"line":2,"column":1,"index":10},"end":{"line":2,"column":6,"index":15}}
180 },
181 {
182 "type": {
183 "label": "${",
184 "beforeExpr": true,
185 "startsExpr": true,
186 "rightAssociative": false,
187 "isLoop": false,
188 "isAssign": false,
189 "prefix": false,
190 "postfix": false,
191 "binop": null
192 },
193 "value": "${",
194 "start":15,"end":17,"loc":{"start":{"line":2,"column":6,"index":15},"end":{"line":2,"column":8,"index":17}}
195 },
196 {
197 "type": {
198 "label": "name",
199 "beforeExpr": false,
200 "startsExpr": true,
201 "rightAssociative": false,
202 "isLoop": false,
203 "isAssign": false,
204 "prefix": false,
205 "postfix": false,
206 "binop": null,
207 "updateContext": null
208 },
209 "value": "x",
210 "start":17,"end":18,"loc":{"start":{"line":2,"column":8,"index":17},"end":{"line":2,"column":9,"index":18}}
211 },
212 {
213 "type": {
214 "label": "}",
215 "beforeExpr": false,
216 "startsExpr": false,
217 "rightAssociative": false,
218 "isLoop": false,
219 "isAssign": false,
220 "prefix": false,
221 "postfix": false,
222 "binop": null
223 },
224 "value": "}",
225 "start":18,"end":19,"loc":{"start":{"line":2,"column":9,"index":18},"end":{"line":2,"column":10,"index":19}}
226 },
227 {
228 "type": {
229 "label": "template",
230 "beforeExpr": false,
231 "startsExpr": false,
232 "rightAssociative": false,
233 "isLoop": false,
234 "isAssign": false,
235 "prefix": false,
236 "postfix": false,
237 "binop": null,
238 "updateContext": null
239 },
240 "value": null,
241 "start":19,"end":24,"loc":{"start":{"line":2,"column":10,"index":19},"end":{"line":2,"column":15,"index":24}}
242 },
243 {
244 "type": {
245 "label": "${",
246 "beforeExpr": true,
247 "startsExpr": true,
248 "rightAssociative": false,
249 "isLoop": false,
250 "isAssign": false,
251 "prefix": false,
252 "postfix": false,
253 "binop": null
254 },
255 "value": "${",
256 "start":24,"end":26,"loc":{"start":{"line":2,"column":15,"index":24},"end":{"line":2,"column":17,"index":26}}
257 },
258 {
259 "type": {
260 "label": "name",
261 "beforeExpr": false,
262 "startsExpr": true,
263 "rightAssociative": false,
264 "isLoop": false,
265 "isAssign": false,
266 "prefix": false,
267 "postfix": false,
268 "binop": null,
269 "updateContext": null
270 },
271 "value": "y",
272 "start":26,"end":27,"loc":{"start":{"line":2,"column":17,"index":26},"end":{"line":2,"column":18,"index":27}}
273 },
274 {
275 "type": {
276 "label": "}",
277 "beforeExpr": false,
278 "startsExpr": false,
279 "rightAssociative": false,
280 "isLoop": false,
281 "isAssign": false,
282 "prefix": false,
283 "postfix": false,
284 "binop": null
285 },
286 "value": "}",
287 "start":27,"end":28,"loc":{"start":{"line":2,"column":18,"index":27},"end":{"line":2,"column":19,"index":28}}
288 },
289 {
290 "type": {
291 "label": "template",
292 "beforeExpr": false,
293 "startsExpr": false,
294 "rightAssociative": false,
295 "isLoop": false,
296 "isAssign": false,
297 "prefix": false,
298 "postfix": false,
299 "binop": null,
300 "updateContext": null
301 },
302 "value": null,
303 "start":28,"end":33,"loc":{"start":{"line":2,"column":19,"index":28},"end":{"line":2,"column":24,"index":33}}
304 },
305 {
306 "type": {
307 "label": "`",
308 "beforeExpr": false,
309 "startsExpr": true,
310 "rightAssociative": false,
311 "isLoop": false,
312 "isAssign": false,
313 "prefix": false,
314 "postfix": false,
315 "binop": null
316 },
317 "value": "`",
318 "start":33,"end":34,"loc":{"start":{"line":2,"column":24,"index":33},"end":{"line":2,"column":25,"index":34}}
319 },
320 {
321 "type": {
322 "label": ";",
323 "beforeExpr": true,
324 "startsExpr": false,
325 "rightAssociative": false,
326 "isLoop": false,
327 "isAssign": false,
328 "prefix": false,
329 "postfix": false,
330 "binop": null,
331 "updateContext": null
332 },
333 "start":34,"end":35,"loc":{"start":{"line":2,"column":25,"index":34},"end":{"line":2,"column":26,"index":35}}
334 },
335 {
336 "type": {
337 "label": "eof",
338 "beforeExpr": false,
339 "startsExpr": false,
340 "rightAssociative": false,
341 "isLoop": false,
342 "isAssign": false,
343 "prefix": false,
344 "postfix": false,
345 "binop": null,
346 "updateContext": null
347 },
348 "start":35,"end":35,"loc":{"start":{"line":2,"column":26,"index":35},"end":{"line":2,"column":26,"index":35}}
349 }
350 ]
351 }