Debian Codegraph @

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