Debian Codegraph @

packages/babel-parser/test/fixtures/comments/basic/class-method/output.json

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