Debian Codegraph @

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

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