Debian Codegraph @

tests/fixtures/ecma-version/6/objectLiteralShorthandMethods/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 50
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 50
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 49
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 49
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 47
101 ],
102 "method": true,
103 "shorthand": false,
104 "computed": false,
105 "key": {
106 "type": "Identifier",
107 "loc": {
108 "start": {
109 "line": 2,
110 "column": 4
111 },
112 "end": {
113 "line": 2,
114 "column": 7
115 }
116 },
117 "range": [
118 14,
119 17
120 ],
121 "name": "foo"
122 },
123 "kind": "init",
124 "value": {
125 "type": "FunctionExpression",
126 "loc": {
127 "start": {
128 "line": 2,
129 "column": 7
130 },
131 "end": {
132 "line": 4,
133 "column": 5
134 }
135 },
136 "range": [
137 17,
138 47
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": 10
150 },
151 "end": {
152 "line": 4,
153 "column": 5
154 }
155 },
156 "range": [
157 20,
158 47
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 30,
175 41
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 37,
191 40
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": "Identifier",
283 "value": "foo",
284 "loc": {
285 "start": {
286 "line": 2,
287 "column": 4
288 },
289 "end": {
290 "line": 2,
291 "column": 7
292 }
293 },
294 "range": [
295 14,
296 17
297 ]
298 },
299 {
300 "type": "Punctuator",
301 "value": "(",
302 "loc": {
303 "start": {
304 "line": 2,
305 "column": 7
306 },
307 "end": {
308 "line": 2,
309 "column": 8
310 }
311 },
312 "range": [
313 17,
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": 10
342 },
343 "end": {
344 "line": 2,
345 "column": 11
346 }
347 },
348 "range": [
349 20,
350 21
351 ]
352 },
353 {
354 "type": "Keyword",
355 "value": "return",
356 "loc": {
357 "start": {
358 "line": 3,
359 "column": 8
360 },
361 "end": {
362 "line": 3,
363 "column": 14
364 }
365 },
366 "range": [
367 30,
368 36
369 ]
370 },
371 {
372 "type": "Identifier",
373 "value": "bar",
374 "loc": {
375 "start": {
376 "line": 3,
377 "column": 15
378 },
379 "end": {
380 "line": 3,
381 "column": 18
382 }
383 },
384 "range": [
385 37,
386 40
387 ]
388 },
389 {
390 "type": "Punctuator",
391 "value": ";",
392 "loc": {
393 "start": {
394 "line": 3,
395 "column": 18
396 },
397 "end": {
398 "line": 3,
399 "column": 19
400 }
401 },
402 "range": [
403 40,
404 41
405 ]
406 },
407 {
408 "type": "Punctuator",
409 "value": "}",
410 "loc": {
411 "start": {
412 "line": 4,
413 "column": 4
414 },
415 "end": {
416 "line": 4,
417 "column": 5
418 }
419 },
420 "range": [
421 46,
422 47
423 ]
424 },
425 {
426 "type": "Punctuator",
427 "value": "}",
428 "loc": {
429 "start": {
430 "line": 5,
431 "column": 0
432 },
433 "end": {
434 "line": 5,
435 "column": 1
436 }
437 },
438 "range": [
439 48,
440 49
441 ]
442 },
443 {
444 "type": "Punctuator",
445 "value": ";",
446 "loc": {
447 "start": {
448 "line": 5,
449 "column": 1
450 },
451 "end": {
452 "line": 5,
453 "column": 2
454 }
455 },
456 "range": [
457 49,
458 50
459 ]
460 }
461 ]
462 };