Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":57,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":21,"index":57}},
4 "errors": [
5 "SyntaxError: Identifier 'bar' has already been declared. (2:13)",
6 "SyntaxError: `bar` has already been exported. Exported identifiers must be unique. (2:13)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":57,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":21,"index":57}},
11 "sourceType": "module",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "ExportNamedDeclaration",
16 "start":0,"end":35,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":35,"index":35}},
17 "specifiers": [],
18 "source": null,
19 "declaration": {
20 "type": "VariableDeclaration",
21 "start":7,"end":35,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":35,"index":35}},
22 "declarations": [
23 {
24 "type": "VariableDeclarator",
25 "start":13,"end":34,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":34,"index":34}},
26 "id": {
27 "type": "ObjectPattern",
28 "start":13,"end":28,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":28,"index":28}},
29 "properties": [
30 {
31 "type": "ObjectProperty",
32 "start":15,"end":18,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":18,"index":18}},
33 "key": {
34 "type": "Identifier",
35 "start":15,"end":18,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":18,"index":18},"identifierName":"foo"},
36 "name": "foo"
37 },
38 "computed": false,
39 "method": false,
40 "shorthand": true,
41 "value": {
42 "type": "Identifier",
43 "start":15,"end":18,"loc":{"start":{"line":1,"column":15,"index":15},"end":{"line":1,"column":18,"index":18},"identifierName":"foo"},
44 "name": "foo"
45 },
46 "extra": {
47 "shorthand": true
48 }
49 },
50 {
51 "type": "RestElement",
52 "start":20,"end":26,"loc":{"start":{"line":1,"column":20,"index":20},"end":{"line":1,"column":26,"index":26}},
53 "argument": {
54 "type": "Identifier",
55 "start":23,"end":26,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":26,"index":26},"identifierName":"bar"},
56 "name": "bar"
57 }
58 }
59 ]
60 },
61 "init": {
62 "type": "Identifier",
63 "start":31,"end":34,"loc":{"start":{"line":1,"column":31,"index":31},"end":{"line":1,"column":34,"index":34},"identifierName":"baz"},
64 "name": "baz"
65 }
66 }
67 ],
68 "kind": "const"
69 }
70 },
71 {
72 "type": "ExportNamedDeclaration",
73 "start":36,"end":57,"loc":{"start":{"line":2,"column":0,"index":36},"end":{"line":2,"column":21,"index":57}},
74 "specifiers": [],
75 "source": null,
76 "declaration": {
77 "type": "VariableDeclaration",
78 "start":43,"end":57,"loc":{"start":{"line":2,"column":7,"index":43},"end":{"line":2,"column":21,"index":57}},
79 "declarations": [
80 {
81 "type": "VariableDeclarator",
82 "start":49,"end":56,"loc":{"start":{"line":2,"column":13,"index":49},"end":{"line":2,"column":20,"index":56}},
83 "id": {
84 "type": "Identifier",
85 "start":49,"end":52,"loc":{"start":{"line":2,"column":13,"index":49},"end":{"line":2,"column":16,"index":52},"identifierName":"bar"},
86 "name": "bar"
87 },
88 "init": {
89 "type": "NumericLiteral",
90 "start":55,"end":56,"loc":{"start":{"line":2,"column":19,"index":55},"end":{"line":2,"column":20,"index":56}},
91 "extra": {
92 "rawValue": 1,
93 "raw": "1"
94 },
95 "value": 1
96 }
97 }
98 ],
99 "kind": "const"
100 }
101 }
102 ],
103 "directives": []
104 }
105 }