Debian Codegraph @

packages/babel-parser/test/fixtures/comments/basic/object-accessor-computed/output.json

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