Debian Codegraph @

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

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