Debian Codegraph @

packages/babel-parser/test/fixtures/es2020/optional-chaining/member-access-bracket/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":97,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":11,"column":13,"index":97}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":97,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":11,"column":13,"index":97}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ExpressionStatement",
12 "start":0,"end":11,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":11,"index":11}},
13 "expression": {
14 "type": "OptionalMemberExpression",
15 "start":0,"end":11,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":11,"index":11}},
16 "object": {
17 "type": "Identifier",
18 "start":0,"end":3,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":3,"index":3},"identifierName":"obj"},
19 "name": "obj"
20 },
21 "computed": true,
22 "property": {
23 "type": "Identifier",
24 "start":6,"end":10,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":10,"index":10},"identifierName":"expr"},
25 "name": "expr"
26 },
27 "optional": true
28 }
29 },
30 {
31 "type": "ExpressionStatement",
32 "start":13,"end":33,"loc":{"start":{"line":3,"column":0,"index":13},"end":{"line":3,"column":20,"index":33}},
33 "expression": {
34 "type": "OptionalMemberExpression",
35 "start":13,"end":33,"loc":{"start":{"line":3,"column":0,"index":13},"end":{"line":3,"column":20,"index":33}},
36 "object": {
37 "type": "OptionalMemberExpression",
38 "start":13,"end":24,"loc":{"start":{"line":3,"column":0,"index":13},"end":{"line":3,"column":11,"index":24}},
39 "object": {
40 "type": "Identifier",
41 "start":13,"end":16,"loc":{"start":{"line":3,"column":0,"index":13},"end":{"line":3,"column":3,"index":16},"identifierName":"obj"},
42 "name": "obj"
43 },
44 "computed": true,
45 "property": {
46 "type": "Identifier",
47 "start":19,"end":23,"loc":{"start":{"line":3,"column":6,"index":19},"end":{"line":3,"column":10,"index":23},"identifierName":"expr"},
48 "name": "expr"
49 },
50 "optional": true
51 },
52 "computed": true,
53 "property": {
54 "type": "Identifier",
55 "start":27,"end":32,"loc":{"start":{"line":3,"column":14,"index":27},"end":{"line":3,"column":19,"index":32},"identifierName":"other"},
56 "name": "other"
57 },
58 "optional": true
59 }
60 },
61 {
62 "type": "ExpressionStatement",
63 "start":35,"end":46,"loc":{"start":{"line":5,"column":0,"index":35},"end":{"line":5,"column":11,"index":46}},
64 "expression": {
65 "type": "OptionalMemberExpression",
66 "start":35,"end":46,"loc":{"start":{"line":5,"column":0,"index":35},"end":{"line":5,"column":11,"index":46}},
67 "object": {
68 "type": "Identifier",
69 "start":35,"end":38,"loc":{"start":{"line":5,"column":0,"index":35},"end":{"line":5,"column":3,"index":38},"identifierName":"obj"},
70 "name": "obj"
71 },
72 "computed": true,
73 "property": {
74 "type": "BooleanLiteral",
75 "start":41,"end":45,"loc":{"start":{"line":5,"column":6,"index":41},"end":{"line":5,"column":10,"index":45}},
76 "value": true
77 },
78 "optional": true
79 }
80 },
81 {
82 "type": "ExpressionStatement",
83 "start":48,"end":67,"loc":{"start":{"line":7,"column":0,"index":48},"end":{"line":7,"column":19,"index":67}},
84 "expression": {
85 "type": "OptionalMemberExpression",
86 "start":48,"end":67,"loc":{"start":{"line":7,"column":0,"index":48},"end":{"line":7,"column":19,"index":67}},
87 "object": {
88 "type": "OptionalMemberExpression",
89 "start":48,"end":59,"loc":{"start":{"line":7,"column":0,"index":48},"end":{"line":7,"column":11,"index":59}},
90 "object": {
91 "type": "Identifier",
92 "start":48,"end":51,"loc":{"start":{"line":7,"column":0,"index":48},"end":{"line":7,"column":3,"index":51},"identifierName":"obj"},
93 "name": "obj"
94 },
95 "computed": true,
96 "property": {
97 "type": "BooleanLiteral",
98 "start":54,"end":58,"loc":{"start":{"line":7,"column":6,"index":54},"end":{"line":7,"column":10,"index":58}},
99 "value": true
100 },
101 "optional": true
102 },
103 "computed": true,
104 "property": {
105 "type": "BooleanLiteral",
106 "start":62,"end":66,"loc":{"start":{"line":7,"column":14,"index":62},"end":{"line":7,"column":18,"index":66}},
107 "value": true
108 },
109 "optional": true
110 }
111 },
112 {
113 "type": "ExpressionStatement",
114 "start":69,"end":82,"loc":{"start":{"line":9,"column":0,"index":69},"end":{"line":9,"column":13,"index":82}},
115 "expression": {
116 "type": "OptionalMemberExpression",
117 "start":69,"end":82,"loc":{"start":{"line":9,"column":0,"index":69},"end":{"line":9,"column":13,"index":82}},
118 "object": {
119 "type": "MemberExpression",
120 "start":69,"end":74,"loc":{"start":{"line":9,"column":0,"index":69},"end":{"line":9,"column":5,"index":74}},
121 "object": {
122 "type": "Identifier",
123 "start":69,"end":72,"loc":{"start":{"line":9,"column":0,"index":69},"end":{"line":9,"column":3,"index":72},"identifierName":"obj"},
124 "name": "obj"
125 },
126 "computed": false,
127 "property": {
128 "type": "Identifier",
129 "start":73,"end":74,"loc":{"start":{"line":9,"column":4,"index":73},"end":{"line":9,"column":5,"index":74},"identifierName":"a"},
130 "name": "a"
131 }
132 },
133 "computed": true,
134 "property": {
135 "type": "Identifier",
136 "start":77,"end":81,"loc":{"start":{"line":9,"column":8,"index":77},"end":{"line":9,"column":12,"index":81},"identifierName":"expr"},
137 "name": "expr"
138 },
139 "optional": true
140 }
141 },
142 {
143 "type": "ExpressionStatement",
144 "start":84,"end":97,"loc":{"start":{"line":11,"column":0,"index":84},"end":{"line":11,"column":13,"index":97}},
145 "expression": {
146 "type": "OptionalMemberExpression",
147 "start":84,"end":97,"loc":{"start":{"line":11,"column":0,"index":84},"end":{"line":11,"column":13,"index":97}},
148 "object": {
149 "type": "MemberExpression",
150 "start":84,"end":89,"loc":{"start":{"line":11,"column":0,"index":84},"end":{"line":11,"column":5,"index":89}},
151 "object": {
152 "type": "Identifier",
153 "start":84,"end":87,"loc":{"start":{"line":11,"column":0,"index":84},"end":{"line":11,"column":3,"index":87},"identifierName":"obj"},
154 "name": "obj"
155 },
156 "computed": false,
157 "property": {
158 "type": "Identifier",
159 "start":88,"end":89,"loc":{"start":{"line":11,"column":4,"index":88},"end":{"line":11,"column":5,"index":89},"identifierName":"a"},
160 "name": "a"
161 }
162 },
163 "computed": true,
164 "property": {
165 "type": "BooleanLiteral",
166 "start":92,"end":96,"loc":{"start":{"line":11,"column":8,"index":92},"end":{"line":11,"column":12,"index":96}},
167 "value": true
168 },
169 "optional": true
170 }
171 }
172 ],
173 "directives": []
174 }
175 }