Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/class-private-properties/optional-chain-object/output.json

raw symbols SCIP
1 {
2 "type": "File",
3 "start":0,"end":219,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":14,"column":1,"index":219}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":219,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":14,"column":1,"index":219}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ClassDeclaration",
12 "start":0,"end":219,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":14,"column":1,"index":219}},
13 "id": {
14 "type": "Identifier",
15 "start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"},
16 "name": "Foo"
17 },
18 "superClass": null,
19 "body": {
20 "type": "ClassBody",
21 "start":10,"end":219,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":14,"column":1,"index":219}},
22 "body": [
23 {
24 "type": "ClassPrivateProperty",
25 "start":14,"end":28,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":16,"index":28}},
26 "static": true,
27 "key": {
28 "type": "PrivateName",
29 "start":21,"end":23,"loc":{"start":{"line":2,"column":9,"index":21},"end":{"line":2,"column":11,"index":23}},
30 "id": {
31 "type": "Identifier",
32 "start":22,"end":23,"loc":{"start":{"line":2,"column":10,"index":22},"end":{"line":2,"column":11,"index":23},"identifierName":"x"},
33 "name": "x"
34 }
35 },
36 "value": {
37 "type": "NumericLiteral",
38 "start":26,"end":27,"loc":{"start":{"line":2,"column":14,"index":26},"end":{"line":2,"column":15,"index":27}},
39 "extra": {
40 "rawValue": 1,
41 "raw": "1"
42 },
43 "value": 1
44 }
45 },
46 {
47 "type": "ClassPrivateProperty",
48 "start":31,"end":57,"loc":{"start":{"line":3,"column":2,"index":31},"end":{"line":3,"column":28,"index":57}},
49 "static": true,
50 "key": {
51 "type": "PrivateName",
52 "start":38,"end":40,"loc":{"start":{"line":3,"column":9,"index":38},"end":{"line":3,"column":11,"index":40}},
53 "id": {
54 "type": "Identifier",
55 "start":39,"end":40,"loc":{"start":{"line":3,"column":10,"index":39},"end":{"line":3,"column":11,"index":40},"identifierName":"m"},
56 "name": "m"
57 }
58 },
59 "value": {
60 "type": "FunctionExpression",
61 "start":43,"end":56,"loc":{"start":{"line":3,"column":14,"index":43},"end":{"line":3,"column":27,"index":56}},
62 "id": null,
63 "generator": false,
64 "async": false,
65 "params": [],
66 "body": {
67 "type": "BlockStatement",
68 "start":54,"end":56,"loc":{"start":{"line":3,"column":25,"index":54},"end":{"line":3,"column":27,"index":56}},
69 "body": [],
70 "directives": []
71 }
72 }
73 },
74 {
75 "type": "ClassMethod",
76 "start":61,"end":217,"loc":{"start":{"line":5,"column":2,"index":61},"end":{"line":13,"column":3,"index":217}},
77 "static": true,
78 "key": {
79 "type": "Identifier",
80 "start":68,"end":72,"loc":{"start":{"line":5,"column":9,"index":68},"end":{"line":5,"column":13,"index":72},"identifierName":"test"},
81 "name": "test"
82 },
83 "computed": false,
84 "kind": "method",
85 "id": null,
86 "generator": false,
87 "async": false,
88 "params": [],
89 "body": {
90 "type": "BlockStatement",
91 "start":75,"end":217,"loc":{"start":{"line":5,"column":16,"index":75},"end":{"line":13,"column":3,"index":217}},
92 "body": [
93 {
94 "type": "VariableDeclaration",
95 "start":81,"end":104,"loc":{"start":{"line":6,"column":4,"index":81},"end":{"line":6,"column":27,"index":104}},
96 "declarations": [
97 {
98 "type": "VariableDeclarator",
99 "start":87,"end":103,"loc":{"start":{"line":6,"column":10,"index":87},"end":{"line":6,"column":26,"index":103}},
100 "id": {
101 "type": "Identifier",
102 "start":87,"end":88,"loc":{"start":{"line":6,"column":10,"index":87},"end":{"line":6,"column":11,"index":88},"identifierName":"o"},
103 "name": "o"
104 },
105 "init": {
106 "type": "ObjectExpression",
107 "start":91,"end":103,"loc":{"start":{"line":6,"column":14,"index":91},"end":{"line":6,"column":26,"index":103}},
108 "properties": [
109 {
110 "type": "ObjectProperty",
111 "start":93,"end":101,"loc":{"start":{"line":6,"column":16,"index":93},"end":{"line":6,"column":24,"index":101}},
112 "method": false,
113 "key": {
114 "type": "Identifier",
115 "start":93,"end":96,"loc":{"start":{"line":6,"column":16,"index":93},"end":{"line":6,"column":19,"index":96},"identifierName":"Foo"},
116 "name": "Foo"
117 },
118 "computed": false,
119 "shorthand": false,
120 "value": {
121 "type": "Identifier",
122 "start":98,"end":101,"loc":{"start":{"line":6,"column":21,"index":98},"end":{"line":6,"column":24,"index":101},"identifierName":"Foo"},
123 "name": "Foo"
124 }
125 }
126 ]
127 }
128 }
129 ],
130 "kind": "const"
131 },
132 {
133 "type": "ReturnStatement",
134 "start":109,"end":213,"loc":{"start":{"line":7,"column":4,"index":109},"end":{"line":12,"column":6,"index":213}},
135 "argument": {
136 "type": "ArrayExpression",
137 "start":116,"end":212,"loc":{"start":{"line":7,"column":11,"index":116},"end":{"line":12,"column":5,"index":212}},
138 "extra": {
139 "trailingComma": 205
140 },
141 "elements": [
142 {
143 "type": "OptionalMemberExpression",
144 "start":124,"end":133,"loc":{"start":{"line":8,"column":6,"index":124},"end":{"line":8,"column":15,"index":133}},
145 "object": {
146 "type": "OptionalMemberExpression",
147 "start":124,"end":130,"loc":{"start":{"line":8,"column":6,"index":124},"end":{"line":8,"column":12,"index":130}},
148 "object": {
149 "type": "Identifier",
150 "start":124,"end":125,"loc":{"start":{"line":8,"column":6,"index":124},"end":{"line":8,"column":7,"index":125},"identifierName":"o"},
151 "name": "o"
152 },
153 "computed": false,
154 "property": {
155 "type": "Identifier",
156 "start":127,"end":130,"loc":{"start":{"line":8,"column":9,"index":127},"end":{"line":8,"column":12,"index":130},"identifierName":"Foo"},
157 "name": "Foo"
158 },
159 "optional": true
160 },
161 "computed": false,
162 "property": {
163 "type": "PrivateName",
164 "start":131,"end":133,"loc":{"start":{"line":8,"column":13,"index":131},"end":{"line":8,"column":15,"index":133}},
165 "id": {
166 "type": "Identifier",
167 "start":132,"end":133,"loc":{"start":{"line":8,"column":14,"index":132},"end":{"line":8,"column":15,"index":133},"identifierName":"x"},
168 "name": "x"
169 }
170 },
171 "optional": false
172 },
173 {
174 "type": "OptionalMemberExpression",
175 "start":141,"end":158,"loc":{"start":{"line":9,"column":6,"index":141},"end":{"line":9,"column":23,"index":158}},
176 "object": {
177 "type": "OptionalMemberExpression",
178 "start":141,"end":150,"loc":{"start":{"line":9,"column":6,"index":141},"end":{"line":9,"column":15,"index":150}},
179 "object": {
180 "type": "OptionalMemberExpression",
181 "start":141,"end":147,"loc":{"start":{"line":9,"column":6,"index":141},"end":{"line":9,"column":12,"index":147}},
182 "object": {
183 "type": "Identifier",
184 "start":141,"end":142,"loc":{"start":{"line":9,"column":6,"index":141},"end":{"line":9,"column":7,"index":142},"identifierName":"o"},
185 "name": "o"
186 },
187 "computed": false,
188 "property": {
189 "type": "Identifier",
190 "start":144,"end":147,"loc":{"start":{"line":9,"column":9,"index":144},"end":{"line":9,"column":12,"index":147},"identifierName":"Foo"},
191 "name": "Foo"
192 },
193 "optional": true
194 },
195 "computed": false,
196 "property": {
197 "type": "PrivateName",
198 "start":148,"end":150,"loc":{"start":{"line":9,"column":13,"index":148},"end":{"line":9,"column":15,"index":150}},
199 "id": {
200 "type": "Identifier",
201 "start":149,"end":150,"loc":{"start":{"line":9,"column":14,"index":149},"end":{"line":9,"column":15,"index":150},"identifierName":"x"},
202 "name": "x"
203 }
204 },
205 "optional": false
206 },
207 "computed": false,
208 "property": {
209 "type": "Identifier",
210 "start":151,"end":158,"loc":{"start":{"line":9,"column":16,"index":151},"end":{"line":9,"column":23,"index":158},"identifierName":"toFixed"},
211 "name": "toFixed"
212 },
213 "optional": false
214 },
215 {
216 "type": "OptionalCallExpression",
217 "start":166,"end":186,"loc":{"start":{"line":10,"column":6,"index":166},"end":{"line":10,"column":26,"index":186}},
218 "callee": {
219 "type": "OptionalMemberExpression",
220 "start":166,"end":183,"loc":{"start":{"line":10,"column":6,"index":166},"end":{"line":10,"column":23,"index":183}},
221 "object": {
222 "type": "OptionalMemberExpression",
223 "start":166,"end":175,"loc":{"start":{"line":10,"column":6,"index":166},"end":{"line":10,"column":15,"index":175}},
224 "object": {
225 "type": "OptionalMemberExpression",
226 "start":166,"end":172,"loc":{"start":{"line":10,"column":6,"index":166},"end":{"line":10,"column":12,"index":172}},
227 "object": {
228 "type": "Identifier",
229 "start":166,"end":167,"loc":{"start":{"line":10,"column":6,"index":166},"end":{"line":10,"column":7,"index":167},"identifierName":"o"},
230 "name": "o"
231 },
232 "computed": false,
233 "property": {
234 "type": "Identifier",
235 "start":169,"end":172,"loc":{"start":{"line":10,"column":9,"index":169},"end":{"line":10,"column":12,"index":172},"identifierName":"Foo"},
236 "name": "Foo"
237 },
238 "optional": true
239 },
240 "computed": false,
241 "property": {
242 "type": "PrivateName",
243 "start":173,"end":175,"loc":{"start":{"line":10,"column":13,"index":173},"end":{"line":10,"column":15,"index":175}},
244 "id": {
245 "type": "Identifier",
246 "start":174,"end":175,"loc":{"start":{"line":10,"column":14,"index":174},"end":{"line":10,"column":15,"index":175},"identifierName":"x"},
247 "name": "x"
248 }
249 },
250 "optional": false
251 },
252 "computed": false,
253 "property": {
254 "type": "Identifier",
255 "start":176,"end":183,"loc":{"start":{"line":10,"column":16,"index":176},"end":{"line":10,"column":23,"index":183},"identifierName":"toFixed"},
256 "name": "toFixed"
257 },
258 "optional": false
259 },
260 "optional": false,
261 "arguments": [
262 {
263 "type": "NumericLiteral",
264 "start":184,"end":185,"loc":{"start":{"line":10,"column":24,"index":184},"end":{"line":10,"column":25,"index":185}},
265 "extra": {
266 "rawValue": 2,
267 "raw": "2"
268 },
269 "value": 2
270 }
271 ]
272 },
273 {
274 "type": "OptionalCallExpression",
275 "start":194,"end":205,"loc":{"start":{"line":11,"column":6,"index":194},"end":{"line":11,"column":17,"index":205}},
276 "callee": {
277 "type": "OptionalMemberExpression",
278 "start":194,"end":203,"loc":{"start":{"line":11,"column":6,"index":194},"end":{"line":11,"column":15,"index":203}},
279 "object": {
280 "type": "OptionalMemberExpression",
281 "start":194,"end":200,"loc":{"start":{"line":11,"column":6,"index":194},"end":{"line":11,"column":12,"index":200}},
282 "object": {
283 "type": "Identifier",
284 "start":194,"end":195,"loc":{"start":{"line":11,"column":6,"index":194},"end":{"line":11,"column":7,"index":195},"identifierName":"o"},
285 "name": "o"
286 },
287 "computed": false,
288 "property": {
289 "type": "Identifier",
290 "start":197,"end":200,"loc":{"start":{"line":11,"column":9,"index":197},"end":{"line":11,"column":12,"index":200},"identifierName":"Foo"},
291 "name": "Foo"
292 },
293 "optional": true
294 },
295 "computed": false,
296 "property": {
297 "type": "PrivateName",
298 "start":201,"end":203,"loc":{"start":{"line":11,"column":13,"index":201},"end":{"line":11,"column":15,"index":203}},
299 "id": {
300 "type": "Identifier",
301 "start":202,"end":203,"loc":{"start":{"line":11,"column":14,"index":202},"end":{"line":11,"column":15,"index":203},"identifierName":"m"},
302 "name": "m"
303 }
304 },
305 "optional": false
306 },
307 "optional": false,
308 "arguments": []
309 }
310 ]
311 }
312 }
313 ],
314 "directives": []
315 }
316 }
317 ]
318 }
319 }
320 ],
321 "directives": []
322 }
323 }