Debian Codegraph @

tests/fixtures/ecma-version/6/templateStrings/expressions.result.js

raw
1 export default {
2 "type": "Program",
3 "loc": {
4 "start": {
5 "line": 1,
6 "column": 0
7 },
8 "end": {
9 "line": 4,
10 "column": 31
11 }
12 },
13 "range": [
14 0,
15 59
16 ],
17 "body": [
18 {
19 "type": "VariableDeclaration",
20 "loc": {
21 "start": {
22 "line": 1,
23 "column": 0
24 },
25 "end": {
26 "line": 1,
27 "column": 10
28 }
29 },
30 "range": [
31 0,
32 10
33 ],
34 "declarations": [
35 {
36 "type": "VariableDeclarator",
37 "loc": {
38 "start": {
39 "line": 1,
40 "column": 4
41 },
42 "end": {
43 "line": 1,
44 "column": 9
45 }
46 },
47 "range": [
48 4,
49 9
50 ],
51 "id": {
52 "type": "Identifier",
53 "loc": {
54 "start": {
55 "line": 1,
56 "column": 4
57 },
58 "end": {
59 "line": 1,
60 "column": 5
61 }
62 },
63 "range": [
64 4,
65 5
66 ],
67 "name": "a"
68 },
69 "init": {
70 "type": "Literal",
71 "loc": {
72 "start": {
73 "line": 1,
74 "column": 8
75 },
76 "end": {
77 "line": 1,
78 "column": 9
79 }
80 },
81 "range": [
82 8,
83 9
84 ],
85 "value": 5,
86 "raw": "5"
87 }
88 }
89 ],
90 "kind": "var"
91 },
92 {
93 "type": "VariableDeclaration",
94 "loc": {
95 "start": {
96 "line": 2,
97 "column": 0
98 },
99 "end": {
100 "line": 2,
101 "column": 15
102 }
103 },
104 "range": [
105 11,
106 26
107 ],
108 "declarations": [
109 {
110 "type": "VariableDeclarator",
111 "loc": {
112 "start": {
113 "line": 2,
114 "column": 4
115 },
116 "end": {
117 "line": 2,
118 "column": 14
119 }
120 },
121 "range": [
122 15,
123 25
124 ],
125 "id": {
126 "type": "Identifier",
127 "loc": {
128 "start": {
129 "line": 2,
130 "column": 4
131 },
132 "end": {
133 "line": 2,
134 "column": 5
135 }
136 },
137 "range": [
138 15,
139 16
140 ],
141 "name": "b"
142 },
143 "init": {
144 "type": "Literal",
145 "loc": {
146 "start": {
147 "line": 2,
148 "column": 8
149 },
150 "end": {
151 "line": 2,
152 "column": 14
153 }
154 },
155 "range": [
156 19,
157 25
158 ],
159 "value": "Fred",
160 "raw": "'Fred'"
161 }
162 }
163 ],
164 "kind": "var"
165 },
166 {
167 "type": "ExpressionStatement",
168 "loc": {
169 "start": {
170 "line": 4,
171 "column": 0
172 },
173 "end": {
174 "line": 4,
175 "column": 31
176 }
177 },
178 "range": [
179 28,
180 59
181 ],
182 "expression": {
183 "type": "TemplateLiteral",
184 "loc": {
185 "start": {
186 "line": 4,
187 "column": 0
188 },
189 "end": {
190 "line": 4,
191 "column": 30
192 }
193 },
194 "range": [
195 28,
196 58
197 ],
198 "expressions": [
199 {
200 "type": "Identifier",
201 "loc": {
202 "start": {
203 "line": 4,
204 "column": 9
205 },
206 "end": {
207 "line": 4,
208 "column": 10
209 }
210 },
211 "range": [
212 37,
213 38
214 ],
215 "name": "b"
216 },
217 {
218 "type": "BinaryExpression",
219 "loc": {
220 "start": {
221 "line": 4,
222 "column": 23
223 },
224 "end": {
225 "line": 4,
226 "column": 28
227 }
228 },
229 "range": [
230 51,
231 56
232 ],
233 "left": {
234 "type": "Identifier",
235 "loc": {
236 "start": {
237 "line": 4,
238 "column": 23
239 },
240 "end": {
241 "line": 4,
242 "column": 24
243 }
244 },
245 "range": [
246 51,
247 52
248 ],
249 "name": "a"
250 },
251 "operator": "+",
252 "right": {
253 "type": "Literal",
254 "loc": {
255 "start": {
256 "line": 4,
257 "column": 27
258 },
259 "end": {
260 "line": 4,
261 "column": 28
262 }
263 },
264 "range": [
265 55,
266 56
267 ],
268 "value": 5,
269 "raw": "5"
270 }
271 }
272 ],
273 "quasis": [
274 {
275 "type": "TemplateElement",
276 "loc": {
277 "start": {
278 "line": 4,
279 "column": 0
280 },
281 "end": {
282 "line": 4,
283 "column": 9
284 }
285 },
286 "range": [
287 28,
288 37
289 ],
290 "value": {
291 "raw": "Hello ",
292 "cooked": "Hello "
293 },
294 "tail": false
295 },
296 {
297 "type": "TemplateElement",
298 "loc": {
299 "start": {
300 "line": 4,
301 "column": 10
302 },
303 "end": {
304 "line": 4,
305 "column": 23
306 }
307 },
308 "range": [
309 38,
310 51
311 ],
312 "value": {
313 "raw": ". a + 5 = ",
314 "cooked": ". a + 5 = "
315 },
316 "tail": false
317 },
318 {
319 "type": "TemplateElement",
320 "loc": {
321 "start": {
322 "line": 4,
323 "column": 28
324 },
325 "end": {
326 "line": 4,
327 "column": 30
328 }
329 },
330 "range": [
331 56,
332 58
333 ],
334 "value": {
335 "raw": "",
336 "cooked": ""
337 },
338 "tail": true
339 }
340 ]
341 }
342 }
343 ],
344 "sourceType": "script",
345 "tokens": [
346 {
347 "type": "Keyword",
348 "value": "var",
349 "loc": {
350 "start": {
351 "line": 1,
352 "column": 0
353 },
354 "end": {
355 "line": 1,
356 "column": 3
357 }
358 },
359 "range": [
360 0,
361 3
362 ]
363 },
364 {
365 "type": "Identifier",
366 "value": "a",
367 "loc": {
368 "start": {
369 "line": 1,
370 "column": 4
371 },
372 "end": {
373 "line": 1,
374 "column": 5
375 }
376 },
377 "range": [
378 4,
379 5
380 ]
381 },
382 {
383 "type": "Punctuator",
384 "value": "=",
385 "loc": {
386 "start": {
387 "line": 1,
388 "column": 6
389 },
390 "end": {
391 "line": 1,
392 "column": 7
393 }
394 },
395 "range": [
396 6,
397 7
398 ]
399 },
400 {
401 "type": "Numeric",
402 "value": "5",
403 "loc": {
404 "start": {
405 "line": 1,
406 "column": 8
407 },
408 "end": {
409 "line": 1,
410 "column": 9
411 }
412 },
413 "range": [
414 8,
415 9
416 ]
417 },
418 {
419 "type": "Punctuator",
420 "value": ";",
421 "loc": {
422 "start": {
423 "line": 1,
424 "column": 9
425 },
426 "end": {
427 "line": 1,
428 "column": 10
429 }
430 },
431 "range": [
432 9,
433 10
434 ]
435 },
436 {
437 "type": "Keyword",
438 "value": "var",
439 "loc": {
440 "start": {
441 "line": 2,
442 "column": 0
443 },
444 "end": {
445 "line": 2,
446 "column": 3
447 }
448 },
449 "range": [
450 11,
451 14
452 ]
453 },
454 {
455 "type": "Identifier",
456 "value": "b",
457 "loc": {
458 "start": {
459 "line": 2,
460 "column": 4
461 },
462 "end": {
463 "line": 2,
464 "column": 5
465 }
466 },
467 "range": [
468 15,
469 16
470 ]
471 },
472 {
473 "type": "Punctuator",
474 "value": "=",
475 "loc": {
476 "start": {
477 "line": 2,
478 "column": 6
479 },
480 "end": {
481 "line": 2,
482 "column": 7
483 }
484 },
485 "range": [
486 17,
487 18
488 ]
489 },
490 {
491 "type": "String",
492 "value": "'Fred'",
493 "loc": {
494 "start": {
495 "line": 2,
496 "column": 8
497 },
498 "end": {
499 "line": 2,
500 "column": 14
501 }
502 },
503 "range": [
504 19,
505 25
506 ]
507 },
508 {
509 "type": "Punctuator",
510 "value": ";",
511 "loc": {
512 "start": {
513 "line": 2,
514 "column": 14
515 },
516 "end": {
517 "line": 2,
518 "column": 15
519 }
520 },
521 "range": [
522 25,
523 26
524 ]
525 },
526 {
527 "type": "Template",
528 "value": "`Hello ${",
529 "loc": {
530 "start": {
531 "line": 4,
532 "column": 0
533 },
534 "end": {
535 "line": 4,
536 "column": 9
537 }
538 },
539 "range": [
540 28,
541 37
542 ]
543 },
544 {
545 "type": "Identifier",
546 "value": "b",
547 "loc": {
548 "start": {
549 "line": 4,
550 "column": 9
551 },
552 "end": {
553 "line": 4,
554 "column": 10
555 }
556 },
557 "range": [
558 37,
559 38
560 ]
561 },
562 {
563 "type": "Template",
564 "value": "}. a + 5 = ${",
565 "loc": {
566 "start": {
567 "line": 4,
568 "column": 10
569 },
570 "end": {
571 "line": 4,
572 "column": 23
573 }
574 },
575 "range": [
576 38,
577 51
578 ]
579 },
580 {
581 "type": "Identifier",
582 "value": "a",
583 "loc": {
584 "start": {
585 "line": 4,
586 "column": 23
587 },
588 "end": {
589 "line": 4,
590 "column": 24
591 }
592 },
593 "range": [
594 51,
595 52
596 ]
597 },
598 {
599 "type": "Punctuator",
600 "value": "+",
601 "loc": {
602 "start": {
603 "line": 4,
604 "column": 25
605 },
606 "end": {
607 "line": 4,
608 "column": 26
609 }
610 },
611 "range": [
612 53,
613 54
614 ]
615 },
616 {
617 "type": "Numeric",
618 "value": "5",
619 "loc": {
620 "start": {
621 "line": 4,
622 "column": 27
623 },
624 "end": {
625 "line": 4,
626 "column": 28
627 }
628 },
629 "range": [
630 55,
631 56
632 ]
633 },
634 {
635 "type": "Template",
636 "value": "}`",
637 "loc": {
638 "start": {
639 "line": 4,
640 "column": 28
641 },
642 "end": {
643 "line": 4,
644 "column": 30
645 }
646 },
647 "range": [
648 56,
649 58
650 ]
651 },
652 {
653 "type": "Punctuator",
654 "value": ";",
655 "loc": {
656 "start": {
657 "line": 4,
658 "column": 30
659 },
660 "end": {
661 "line": 4,
662 "column": 31
663 }
664 },
665 "range": [
666 58,
667 59
668 ]
669 }
670 ]
671 };