Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":26,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":26,"index":26}},
4 "errors": [
5 "SyntaxError: Unexpected trailing comma after rest element. (1:16)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":26,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":26,"index":26}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "VariableDeclaration",
15 "start":0,"end":26,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":26,"index":26}},
16 "declarations": [
17 {
18 "type": "VariableDeclarator",
19 "start":4,"end":25,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":25,"index":25}},
20 "id": {
21 "type": "ObjectPattern",
22 "start":4,"end":19,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":19,"index":19}},
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": "ObjectProperty",
46 "start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10}},
47 "key": {
48 "type": "Identifier",
49 "start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10},"identifierName":"y"},
50 "name": "y"
51 },
52 "computed": false,
53 "method": false,
54 "shorthand": true,
55 "value": {
56 "type": "Identifier",
57 "start":9,"end":10,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":10,"index":10},"identifierName":"y"},
58 "name": "y"
59 },
60 "extra": {
61 "shorthand": true
62 }
63 },
64 {
65 "type": "RestElement",
66 "start":12,"end":16,"loc":{"start":{"line":1,"column":12,"index":12},"end":{"line":1,"column":16,"index":16}},
67 "argument": {
68 "type": "Identifier",
69 "start":15,"end":16,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":16,"index":16},"identifierName":"z"},
70 "name": "z"
71 }
72 }
73 ],
74 "extra": {
75 "trailingComma": 16
76 }
77 },
78 "init": {
79 "type": "Identifier",
80 "start":22,"end":25,"loc":{"start":{"line":1,"column":22,"index":22},"end":{"line":1,"column":25,"index":25},"identifierName":"obj"},
81 "name": "obj"
82 }
83 }
84 ],
85 "kind": "let"
86 }
87 ],
88 "directives": []
89 }
90 }