Debian Codegraph @

tests/fixtures/ecma-version/6/objectLiteralShorthandMethods/string-name-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": false,
105 "key": {
106 "type": "Literal",
107 "loc": {
108 "start": {
109 "line": 2,
110 "column": 4
111 },
112 "end": {
113 "line": 2,
114 "column": 9
115 }
116 },
117 "range": [
118 14,
119 19
120 ],
121 "value": "foo",
122 "raw": "\"foo\""
123 },
124 "kind": "init",
125 "value": {
126 "type": "FunctionExpression",
127 "loc": {
128 "start": {
129 "line": 2,
130 "column": 9
131 },
132 "end": {
133 "line": 4,
134 "column": 5
135 }
136 },
137 "range": [
138 19,
139 49
140 ],
141 "id": null,
142 "generator": false,
143 "expression": false,
144 "params": [],
145 "body": {
146 "type": "BlockStatement",
147 "loc": {
148 "start": {
149 "line": 2,
150 "column": 12
151 },
152 "end": {
153 "line": 4,
154 "column": 5
155 }
156 },
157 "range": [
158 22,
159 49
160 ],
161 "body": [
162 {
163 "type": "ReturnStatement",
164 "loc": {
165 "start": {
166 "line": 3,
167 "column": 8
168 },
169 "end": {
170 "line": 3,
171 "column": 19
172 }
173 },
174 "range": [
175 32,
176 43
177 ],
178 "argument": {
179 "type": "Identifier",
180 "loc": {
181 "start": {
182 "line": 3,
183 "column": 15
184 },
185 "end": {
186 "line": 3,
187 "column": 18
188 }
189 },
190 "range": [
191 39,
192 42
193 ],
194 "name": "bar"
195 }
196 }
197 ]
198 }
199 }
200 }
201 ]
202 }
203 }
204 ],
205 "kind": "var"
206 }
207 ],
208 "sourceType": "script",
209 "tokens": [
210 {
211 "type": "Keyword",
212 "value": "var",
213 "loc": {
214 "start": {
215 "line": 1,
216 "column": 0
217 },
218 "end": {
219 "line": 1,
220 "column": 3
221 }
222 },
223 "range": [
224 0,
225 3
226 ]
227 },
228 {
229 "type": "Identifier",
230 "value": "x",
231 "loc": {
232 "start": {
233 "line": 1,
234 "column": 4
235 },
236 "end": {
237 "line": 1,
238 "column": 5
239 }
240 },
241 "range": [
242 4,
243 5
244 ]
245 },
246 {
247 "type": "Punctuator",
248 "value": "=",
249 "loc": {
250 "start": {
251 "line": 1,
252 "column": 6
253 },
254 "end": {
255 "line": 1,
256 "column": 7
257 }
258 },
259 "range": [
260 6,
261 7
262 ]
263 },
264 {
265 "type": "Punctuator",
266 "value": "{",
267 "loc": {
268 "start": {
269 "line": 1,
270 "column": 8
271 },
272 "end": {
273 "line": 1,
274 "column": 9
275 }
276 },
277 "range": [
278 8,
279 9
280 ]
281 },
282 {
283 "type": "String",
284 "value": "\"foo\"",
285 "loc": {
286 "start": {
287 "line": 2,
288 "column": 4
289 },
290 "end": {
291 "line": 2,
292 "column": 9
293 }
294 },
295 "range": [
296 14,
297 19
298 ]
299 },
300 {
301 "type": "Punctuator",
302 "value": "(",
303 "loc": {
304 "start": {
305 "line": 2,
306 "column": 9
307 },
308 "end": {
309 "line": 2,
310 "column": 10
311 }
312 },
313 "range": [
314 19,
315 20
316 ]
317 },
318 {
319 "type": "Punctuator",
320 "value": ")",
321 "loc": {
322 "start": {
323 "line": 2,
324 "column": 10
325 },
326 "end": {
327 "line": 2,
328 "column": 11
329 }
330 },
331 "range": [
332 20,
333 21
334 ]
335 },
336 {
337 "type": "Punctuator",
338 "value": "{",
339 "loc": {
340 "start": {
341 "line": 2,
342 "column": 12
343 },
344 "end": {
345 "line": 2,
346 "column": 13
347 }
348 },
349 "range": [
350 22,
351 23
352 ]
353 },
354 {
355 "type": "Keyword",
356 "value": "return",
357 "loc": {
358 "start": {
359 "line": 3,
360 "column": 8
361 },
362 "end": {
363 "line": 3,
364 "column": 14
365 }
366 },
367 "range": [
368 32,
369 38
370 ]
371 },
372 {
373 "type": "Identifier",
374 "value": "bar",
375 "loc": {
376 "start": {
377 "line": 3,
378 "column": 15
379 },
380 "end": {
381 "line": 3,
382 "column": 18
383 }
384 },
385 "range": [
386 39,
387 42
388 ]
389 },
390 {
391 "type": "Punctuator",
392 "value": ";",
393 "loc": {
394 "start": {
395 "line": 3,
396 "column": 18
397 },
398 "end": {
399 "line": 3,
400 "column": 19
401 }
402 },
403 "range": [
404 42,
405 43
406 ]
407 },
408 {
409 "type": "Punctuator",
410 "value": "}",
411 "loc": {
412 "start": {
413 "line": 4,
414 "column": 4
415 },
416 "end": {
417 "line": 4,
418 "column": 5
419 }
420 },
421 "range": [
422 48,
423 49
424 ]
425 },
426 {
427 "type": "Punctuator",
428 "value": "}",
429 "loc": {
430 "start": {
431 "line": 5,
432 "column": 0
433 },
434 "end": {
435 "line": 5,
436 "column": 1
437 }
438 },
439 "range": [
440 50,
441 51
442 ]
443 },
444 {
445 "type": "Punctuator",
446 "value": ";",
447 "loc": {
448 "start": {
449 "line": 5,
450 "column": 1
451 },
452 "end": {
453 "line": 5,
454 "column": 2
455 }
456 },
457 "range": [
458 51,
459 52
460 ]
461 }
462 ]
463 };