Debian Codegraph @

packages/babel-parser/test/fixtures/es2015/modules/duplicate-named-export-destructuring13/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":103,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":76,"index":103}},
4 "errors": [
5 "SyntaxError: Identifier 'foo4' has already been declared. (2:58)",
6 "SyntaxError: `foo4` has already been exported. Exported identifiers must be unique. (2:58)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":103,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":76,"index":103}},
11 "sourceType": "module",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "ExportNamedDeclaration",
16 "start":0,"end":25,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":25,"index":25}},
17 "specifiers": [],
18 "source": null,
19 "declaration": {
20 "type": "FunctionDeclaration",
21 "start":7,"end":25,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":25,"index":25}},
22 "id": {
23 "type": "Identifier",
24 "start":16,"end":20,"loc":{"start":{"line":1,"column":16,"index":16},"end":{"line":1,"column":20,"index":20},"identifierName":"foo4"},
25 "name": "foo4"
26 },
27 "generator": false,
28 "async": false,
29 "params": [],
30 "body": {
31 "type": "BlockStatement",
32 "start":23,"end":25,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":25,"index":25}},
33 "body": [],
34 "directives": []
35 }
36 }
37 },
38 {
39 "type": "EmptyStatement",
40 "start":25,"end":26,"loc":{"start":{"line":1,"column":25,"index":25},"end":{"line":1,"column":26,"index":26}}
41 },
42 {
43 "type": "ExportNamedDeclaration",
44 "start":27,"end":103,"loc":{"start":{"line":2,"column":0,"index":27},"end":{"line":2,"column":76,"index":103}},
45 "specifiers": [],
46 "source": null,
47 "declaration": {
48 "type": "VariableDeclaration",
49 "start":34,"end":103,"loc":{"start":{"line":2,"column":7,"index":34},"end":{"line":2,"column":76,"index":103}},
50 "declarations": [
51 {
52 "type": "VariableDeclarator",
53 "start":40,"end":102,"loc":{"start":{"line":2,"column":13,"index":40},"end":{"line":2,"column":75,"index":102}},
54 "id": {
55 "type": "ObjectPattern",
56 "start":40,"end":96,"loc":{"start":{"line":2,"column":13,"index":40},"end":{"line":2,"column":69,"index":96}},
57 "properties": [
58 {
59 "type": "ObjectProperty",
60 "start":42,"end":60,"loc":{"start":{"line":2,"column":15,"index":42},"end":{"line":2,"column":33,"index":60}},
61 "key": {
62 "type": "Identifier",
63 "start":42,"end":43,"loc":{"start":{"line":2,"column":15,"index":42},"end":{"line":2,"column":16,"index":43},"identifierName":"a"},
64 "name": "a"
65 },
66 "computed": false,
67 "method": false,
68 "shorthand": false,
69 "value": {
70 "type": "ArrayPattern",
71 "start":45,"end":60,"loc":{"start":{"line":2,"column":18,"index":45},"end":{"line":2,"column":33,"index":60}},
72 "elements": [
73 {
74 "type": "ObjectPattern",
75 "start":46,"end":59,"loc":{"start":{"line":2,"column":19,"index":46},"end":{"line":2,"column":32,"index":59}},
76 "properties": [
77 {
78 "type": "ObjectProperty",
79 "start":48,"end":57,"loc":{"start":{"line":2,"column":21,"index":48},"end":{"line":2,"column":30,"index":57}},
80 "key": {
81 "type": "Identifier",
82 "start":48,"end":52,"loc":{"start":{"line":2,"column":21,"index":48},"end":{"line":2,"column":25,"index":52},"identifierName":"foo4"},
83 "name": "foo4"
84 },
85 "computed": false,
86 "method": false,
87 "shorthand": false,
88 "value": {
89 "type": "Identifier",
90 "start":54,"end":57,"loc":{"start":{"line":2,"column":27,"index":54},"end":{"line":2,"column":30,"index":57},"identifierName":"foo"},
91 "name": "foo"
92 }
93 }
94 ]
95 }
96 ]
97 }
98 },
99 {
100 "type": "ObjectProperty",
101 "start":62,"end":63,"loc":{"start":{"line":2,"column":35,"index":62},"end":{"line":2,"column":36,"index":63}},
102 "key": {
103 "type": "Identifier",
104 "start":62,"end":63,"loc":{"start":{"line":2,"column":35,"index":62},"end":{"line":2,"column":36,"index":63},"identifierName":"b"},
105 "name": "b"
106 },
107 "computed": false,
108 "method": false,
109 "shorthand": true,
110 "value": {
111 "type": "Identifier",
112 "start":62,"end":63,"loc":{"start":{"line":2,"column":35,"index":62},"end":{"line":2,"column":36,"index":63},"identifierName":"b"},
113 "name": "b"
114 },
115 "extra": {
116 "shorthand": true
117 }
118 },
119 {
120 "type": "ObjectProperty",
121 "start":65,"end":94,"loc":{"start":{"line":2,"column":38,"index":65},"end":{"line":2,"column":67,"index":94}},
122 "key": {
123 "type": "Identifier",
124 "start":65,"end":66,"loc":{"start":{"line":2,"column":38,"index":65},"end":{"line":2,"column":39,"index":66},"identifierName":"c"},
125 "name": "c"
126 },
127 "computed": false,
128 "method": false,
129 "shorthand": false,
130 "value": {
131 "type": "ObjectPattern",
132 "start":68,"end":94,"loc":{"start":{"line":2,"column":41,"index":68},"end":{"line":2,"column":67,"index":94}},
133 "properties": [
134 {
135 "type": "ObjectProperty",
136 "start":70,"end":92,"loc":{"start":{"line":2,"column":43,"index":70},"end":{"line":2,"column":65,"index":92}},
137 "key": {
138 "type": "Identifier",
139 "start":70,"end":74,"loc":{"start":{"line":2,"column":43,"index":70},"end":{"line":2,"column":47,"index":74},"identifierName":"foo2"},
140 "name": "foo2"
141 },
142 "computed": false,
143 "method": false,
144 "shorthand": false,
145 "value": {
146 "type": "ArrayPattern",
147 "start":76,"end":92,"loc":{"start":{"line":2,"column":49,"index":76},"end":{"line":2,"column":65,"index":92}},
148 "elements": [
149 {
150 "type": "ObjectPattern",
151 "start":77,"end":91,"loc":{"start":{"line":2,"column":50,"index":77},"end":{"line":2,"column":64,"index":91}},
152 "properties": [
153 {
154 "type": "ObjectProperty",
155 "start":79,"end":89,"loc":{"start":{"line":2,"column":52,"index":79},"end":{"line":2,"column":62,"index":89}},
156 "key": {
157 "type": "Identifier",
158 "start":79,"end":83,"loc":{"start":{"line":2,"column":52,"index":79},"end":{"line":2,"column":56,"index":83},"identifierName":"foo3"},
159 "name": "foo3"
160 },
161 "computed": false,
162 "method": false,
163 "shorthand": false,
164 "value": {
165 "type": "Identifier",
166 "start":85,"end":89,"loc":{"start":{"line":2,"column":58,"index":85},"end":{"line":2,"column":62,"index":89},"identifierName":"foo4"},
167 "name": "foo4"
168 }
169 }
170 ]
171 }
172 ]
173 }
174 }
175 ]
176 }
177 }
178 ]
179 },
180 "init": {
181 "type": "Identifier",
182 "start":99,"end":102,"loc":{"start":{"line":2,"column":72,"index":99},"end":{"line":2,"column":75,"index":102},"identifierName":"bar"},
183 "name": "bar"
184 }
185 }
186 ],
187 "kind": "const"
188 }
189 }
190 ],
191 "directives": []
192 }
193 }