Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/async-do-expressions/scoping-variable/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":2,"index":54}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":2,"index":54}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":0,"end":54,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":2,"index":54}},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":4,"end":53,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":4,"column":1,"index":53}},
17 "id": {
18 "type": "Identifier",
19 "start":4,"end":5,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":5,"index":5},"identifierName":"x"},
20 "name": "x"
21 },
22 "init": {
23 "type": "DoExpression",
24 "start":8,"end":53,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":4,"column":1,"index":53}},
25 "async": true,
26 "body": {
27 "type": "BlockStatement",
28 "start":17,"end":53,"loc":{"start":{"line":1,"column":17,"index":17},"end":{"line":4,"column":1,"index":53}},
29 "body": [
30 {
31 "type": "VariableDeclaration",
32 "start":21,"end":35,"loc":{"start":{"line":2,"column":2,"index":21},"end":{"line":2,"column":16,"index":35}},
33 "declarations": [
34 {
35 "type": "VariableDeclarator",
36 "start":25,"end":34,"loc":{"start":{"line":2,"column":6,"index":25},"end":{"line":2,"column":15,"index":34}},
37 "id": {
38 "type": "Identifier",
39 "start":25,"end":28,"loc":{"start":{"line":2,"column":6,"index":25},"end":{"line":2,"column":9,"index":28},"identifierName":"tmp"},
40 "name": "tmp"
41 },
42 "init": {
43 "type": "CallExpression",
44 "start":31,"end":34,"loc":{"start":{"line":2,"column":12,"index":31},"end":{"line":2,"column":15,"index":34}},
45 "callee": {
46 "type": "Identifier",
47 "start":31,"end":32,"loc":{"start":{"line":2,"column":12,"index":31},"end":{"line":2,"column":13,"index":32},"identifierName":"f"},
48 "name": "f"
49 },
50 "arguments": []
51 }
52 }
53 ],
54 "kind": "let"
55 },
56 {
57 "type": "ExpressionStatement",
58 "start":38,"end":51,"loc":{"start":{"line":3,"column":2,"index":38},"end":{"line":3,"column":15,"index":51}},
59 "expression": {
60 "type": "BinaryExpression",
61 "start":38,"end":51,"loc":{"start":{"line":3,"column":2,"index":38},"end":{"line":3,"column":15,"index":51}},
62 "left": {
63 "type": "BinaryExpression",
64 "start":38,"end":47,"loc":{"start":{"line":3,"column":2,"index":38},"end":{"line":3,"column":11,"index":47}},
65 "left": {
66 "type": "Identifier",
67 "start":38,"end":41,"loc":{"start":{"line":3,"column":2,"index":38},"end":{"line":3,"column":5,"index":41},"identifierName":"tmp"},
68 "name": "tmp"
69 },
70 "operator": "*",
71 "right": {
72 "type": "Identifier",
73 "start":44,"end":47,"loc":{"start":{"line":3,"column":8,"index":44},"end":{"line":3,"column":11,"index":47},"identifierName":"tmp"},
74 "name": "tmp"
75 }
76 },
77 "operator": "+",
78 "right": {
79 "type": "NumericLiteral",
80 "start":50,"end":51,"loc":{"start":{"line":3,"column":14,"index":50},"end":{"line":3,"column":15,"index":51}},
81 "extra": {
82 "rawValue": 1,
83 "raw": "1"
84 },
85 "value": 1
86 }
87 }
88 }
89 ],
90 "directives": []
91 }
92 }
93 }
94 ],
95 "kind": "let"
96 }
97 ],
98 "directives": []
99 }
100 }