Debian Codegraph @

tests/fixtures/ecma-version/6/objectLiteralShorthandMethods-and-objectLiteralComputedProperties/computed-method-property.result.js

raw
1 export default {
2 "type": "Program",
3 "loc": {
4 "start": {
5 "line": 1,
6 "column": 0
7 },
8 "end": {
9 "line": 5,
10 "column": 2
11 }
12 },
13 "range": [
14 0,
15 52
16 ],
17 "body": [
18 {
19 "type": "VariableDeclaration",
20 "loc": {
21 "start": {
22 "line": 1,
23 "column": 0
24 },
25 "end": {
26 "line": 5,
27 "column": 2
28 }
29 },
30 "range": [
31 0,
32 52
33 ],
34 "declarations": [
35 {
36 "type": "VariableDeclarator",
37 "loc": {
38 "start": {
39 "line": 1,
40 "column": 4
41 },
42 "end": {
43 "line": 5,
44 "column": 1
45 }
46 },
47 "range": [
48 4,
49 51
50 ],
51 "id": {
52 "type": "Identifier",
53 "loc": {
54 "start": {
55 "line": 1,
56 "column": 4
57 },
58 "end": {
59 "line": 1,
60 "column": 5
61 }
62 },
63 "range": [
64 4,
65 5
66 ],
67 "name": "x"
68 },
69 "init": {
70 "type": "ObjectExpression",
71 "loc": {
72 "start": {
73 "line": 1,
74 "column": 8
75 },
76 "end": {
77 "line": 5,
78 "column": 1
79 }
80 },
81 "range": [
82 8,
83 51
84 ],
85 "properties": [
86 {
87 "type": "Property",
88 "loc": {
89 "start": {
90 "line": 2,
91 "column": 4
92 },
93 "end": {
94 "line": 4,
95 "column": 5
96 }
97 },
98 "range": [
99 14,
100 49
101 ],
102 "method": true,
103 "shorthand": false,
104 "computed": true,
105 "key": {
106 "type": "Identifier",
107 "loc": {
108 "start": {
109 "line": 2,
110 "column": 5
111 },
112 "end": {
113 "line": 2,
114 "column": 8
115 }
116 },
117 "range": [
118 15,
119 18
120 ],
121 "name": "foo"
122 },
123 "kind": "init",
124 "value": {
125 "type": "FunctionExpression",
126 "loc": {
127 "start": {
128 "line": 2,
129 "column": 9
130 },
131 "end": {
132 "line": 4,
133 "column": 5
134 }
135 },
136 "range": [
137 19,
138 49
139 ],
140 "id": null,
141 "generator": false,
142 "expression": false,
143 "params": [],
144 "body": {
145 "type": "BlockStatement",
146 "loc": {
147 "start": {
148 "line": 2,
149 "column": 12
150 },
151 "end": {
152 "line": 4,
153 "column": 5
154 }
155 },
156 "range": [
157 22,
158 49
159 ],
160 "body": [
161 {
162 "type": "ReturnStatement",
163 "loc": {
164 "start": {
165 "line": 3,
166 "column": 8
167 },
168 "end": {
169 "line": 3,
170 "column": 19
171 }
172 },
173 "range": [
174 32,
175 43
176 ],
177 "argument": {
178 "type": "Identifier",
179 "loc": {
180 "start": {
181 "line": 3,
182 "column": 15
183 },
184 "end": {
185 "line": 3,
186 "column": 18
187 }
188 },
189 "range": [
190 39,
191 42
192 ],
193 "name": "bar"
194 }
195 }
196 ]
197 }
198 }
199 }
200 ]
201 }
202 }
203 ],
204 "kind": "var"
205 }
206 ],
207 "sourceType": "script",
208 "tokens": [
209 {
210 "type": "Keyword",
211 "value": "var",
212 "loc": {
213 "start": {
214 "line": 1,
215 "column": 0
216 },
217 "end": {
218 "line": 1,
219 "column": 3
220 }
221 },
222 "range": [
223 0,
224 3
225 ]
226 },
227 {
228 "type": "Identifier",
229 "value": "x",
230 "loc": {
231 "start": {
232 "line": 1,
233 "column": 4
234 },
235 "end": {
236 "line": 1,
237 "column": 5
238 }
239 },
240 "range": [
241 4,
242 5
243 ]
244 },
245 {
246 "type": "Punctuator",
247 "value": "=",
248 "loc": {
249 "start": {
250 "line": 1,
251 "column": 6
252 },
253 "end": {
254 "line": 1,
255 "column": 7
256 }
257 },
258 "range": [
259 6,
260 7
261 ]
262 },
263 {
264 "type": "Punctuator",
265 "value": "{",
266 "loc": {
267 "start": {
268 "line": 1,
269 "column": 8
270 },
271 "end": {
272 "line": 1,
273 "column": 9
274 }
275 },
276 "range": [
277 8,
278 9
279 ]
280 },
281 {
282 "type": "Punctuator",
283 "value": "[",
284 "loc": {
285 "start": {
286 "line": 2,
287 "column": 4
288 },
289 "end": {
290 "line": 2,
291 "column": 5
292 }
293 },
294 "range": [
295 14,
296 15
297 ]
298 },
299 {
300 "type": "Identifier",
301 "value": "foo",
302 "loc": {
303 "start": {
304 "line": 2,
305 "column": 5
306 },
307 "end": {
308 "line": 2,
309 "column": 8
310 }
311 },
312 "range": [
313 15,
314 18
315 ]
316 },
317 {
318 "type": "Punctuator",
319 "value": "]",
320 "loc": {
321 "start": {
322 "line": 2,
323 "column": 8
324 },
325 "end": {
326 "line": 2,
327 "column": 9
328 }
329 },
330 "range": [
331 18,
332 19
333 ]
334 },
335 {
336 "type": "Punctuator",
337 "value": "(",
338 "loc": {
339 "start": {
340 "line": 2,
341 "column": 9
342 },
343 "end": {
344 "line": 2,
345 "column": 10
346 }
347 },
348 "range": [
349 19,
350 20
351 ]
352 },
353 {
354 "type": "Punctuator",
355 "value": ")",
356 "loc": {
357 "start": {
358 "line": 2,
359 "column": 10
360 },
361 "end": {
362 "line": 2,
363 "column": 11
364 }
365 },
366 "range": [
367 20,
368 21
369 ]
370 },
371 {
372 "type": "Punctuator",
373 "value": "{",
374 "loc": {
375 "start": {
376 "line": 2,
377 "column": 12
378 },
379 "end": {
380 "line": 2,
381 "column": 13
382 }
383 },
384 "range": [
385 22,
386 23
387 ]
388 },
389 {
390 "type": "Keyword",
391 "value": "return",
392 "loc": {
393 "start": {
394 "line": 3,
395 "column": 8
396 },
397 "end": {
398 "line": 3,
399 "column": 14
400 }
401 },
402 "range": [
403 32,
404 38
405 ]
406 },
407 {
408 "type": "Identifier",
409 "value": "bar",
410 "loc": {
411 "start": {
412 "line": 3,
413 "column": 15
414 },
415 "end": {
416 "line": 3,
417 "column": 18
418 }
419 },
420 "range": [
421 39,
422 42
423 ]
424 },
425 {
426 "type": "Punctuator",
427 "value": ";",
428 "loc": {
429 "start": {
430 "line": 3,
431 "column": 18
432 },
433 "end": {
434 "line": 3,
435 "column": 19
436 }
437 },
438 "range": [
439 42,
440 43
441 ]
442 },
443 {
444 "type": "Punctuator",
445 "value": "}",
446 "loc": {
447 "start": {
448 "line": 4,
449 "column": 4
450 },
451 "end": {
452 "line": 4,
453 "column": 5
454 }
455 },
456 "range": [
457 48,
458 49
459 ]
460 },
461 {
462 "type": "Punctuator",
463 "value": "}",
464 "loc": {
465 "start": {
466 "line": 5,
467 "column": 0
468 },
469 "end": {
470 "line": 5,
471 "column": 1
472 }
473 },
474 "range": [
475 50,
476 51
477 ]
478 },
479 {
480 "type": "Punctuator",
481 "value": ";",
482 "loc": {
483 "start": {
484 "line": 5,
485 "column": 1
486 },
487 "end": {
488 "line": 5,
489 "column": 2
490 }
491 },
492 "range": [
493 51,
494 52
495 ]
496 }
497 ]
498 };