Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":48,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":2,"index":48}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":48,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":2,"index":48}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":0,"end":48,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":2,"index":48}},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":4,"end":47,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":4,"column":1,"index":47}},
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":47,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":4,"column":1,"index":47}},
25 "async": false,
26 "body": {
27 "type": "BlockStatement",
28 "start":11,"end":47,"loc":{"start":{"line":1,"column":11,"index":11},"end":{"line":4,"column":1,"index":47}},
29 "body": [
30 {
31 "type": "VariableDeclaration",
32 "start":15,"end":29,"loc":{"start":{"line":2,"column":2,"index":15},"end":{"line":2,"column":16,"index":29}},
33 "declarations": [
34 {
35 "type": "VariableDeclarator",
36 "start":19,"end":28,"loc":{"start":{"line":2,"column":6,"index":19},"end":{"line":2,"column":15,"index":28}},
37 "id": {
38 "type": "Identifier",
39 "start":19,"end":22,"loc":{"start":{"line":2,"column":6,"index":19},"end":{"line":2,"column":9,"index":22},"identifierName":"tmp"},
40 "name": "tmp"
41 },
42 "init": {
43 "type": "CallExpression",
44 "start":25,"end":28,"loc":{"start":{"line":2,"column":12,"index":25},"end":{"line":2,"column":15,"index":28}},
45 "callee": {
46 "type": "Identifier",
47 "start":25,"end":26,"loc":{"start":{"line":2,"column":12,"index":25},"end":{"line":2,"column":13,"index":26},"identifierName":"f"},
48 "name": "f"
49 },
50 "arguments": []
51 }
52 }
53 ],
54 "kind": "let"
55 },
56 {
57 "type": "ExpressionStatement",
58 "start":32,"end":45,"loc":{"start":{"line":3,"column":2,"index":32},"end":{"line":3,"column":15,"index":45}},
59 "expression": {
60 "type": "BinaryExpression",
61 "start":32,"end":45,"loc":{"start":{"line":3,"column":2,"index":32},"end":{"line":3,"column":15,"index":45}},
62 "left": {
63 "type": "BinaryExpression",
64 "start":32,"end":41,"loc":{"start":{"line":3,"column":2,"index":32},"end":{"line":3,"column":11,"index":41}},
65 "left": {
66 "type": "Identifier",
67 "start":32,"end":35,"loc":{"start":{"line":3,"column":2,"index":32},"end":{"line":3,"column":5,"index":35},"identifierName":"tmp"},
68 "name": "tmp"
69 },
70 "operator": "*",
71 "right": {
72 "type": "Identifier",
73 "start":38,"end":41,"loc":{"start":{"line":3,"column":8,"index":38},"end":{"line":3,"column":11,"index":41},"identifierName":"tmp"},
74 "name": "tmp"
75 }
76 },
77 "operator": "+",
78 "right": {
79 "type": "NumericLiteral",
80 "start":44,"end":45,"loc":{"start":{"line":3,"column":14,"index":44},"end":{"line":3,"column":15,"index":45}},
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 }