Debian Codegraph @

packages/babel-parser/test/fixtures/es2018/object-rest-spread/7/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
4 "errors": [
5 "SyntaxError: Rest element must be last element. (1:10)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "VariableDeclaration",
15 "start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
16 "declarations": [
17 {
18 "type": "VariableDeclarator",
19 "start":4,"end":24,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":24,"index":24}},
20 "id": {
21 "type": "ObjectPattern",
22 "start":4,"end":18,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":18,"index":18}},
23 "properties": [
24 {
25 "type": "RestElement",
26 "start":6,"end":10,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":10,"index":10}},
27 "argument": {
28 "type": "Identifier",
29 "start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10},"identifierName":"x"},
30 "name": "x"
31 }
32 },
33 {
34 "type": "ObjectProperty",
35 "start":12,"end":13,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":13,"index":13}},
36 "key": {
37 "type": "Identifier",
38 "start":12,"end":13,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":13,"index":13},"identifierName":"y"},
39 "name": "y"
40 },
41 "computed": false,
42 "method": false,
43 "shorthand": true,
44 "value": {
45 "type": "Identifier",
46 "start":12,"end":13,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":13,"index":13},"identifierName":"y"},
47 "name": "y"
48 },
49 "extra": {
50 "shorthand": true
51 }
52 },
53 {
54 "type": "ObjectProperty",
55 "start":15,"end":16,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":16,"index":16}},
56 "key": {
57 "type": "Identifier",
58 "start":15,"end":16,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":16,"index":16},"identifierName":"z"},
59 "name": "z"
60 },
61 "computed": false,
62 "method": false,
63 "shorthand": true,
64 "value": {
65 "type": "Identifier",
66 "start":15,"end":16,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":16,"index":16},"identifierName":"z"},
67 "name": "z"
68 },
69 "extra": {
70 "shorthand": true
71 }
72 }
73 ]
74 },
75 "init": {
76 "type": "Identifier",
77 "start":21,"end":24,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":24,"index":24},"identifierName":"obj"},
78 "name": "obj"
79 }
80 }
81 ],
82 "kind": "let"
83 }
84 ],
85 "directives": []
86 }
87 }