Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":94,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":67,"index":94}},
4 "errors": [
5 "SyntaxError: Identifier 'foo4' has already been declared. (2:49)",
6 "SyntaxError: `foo4` has already been exported. Exported identifiers must be unique. (2:49)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":94,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":67,"index":94}},
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":94,"loc":{"start":{"line":2,"column":0,"index":27},"end":{"line":2,"column":67,"index":94}},
45 "specifiers": [],
46 "source": null,
47 "declaration": {
48 "type": "VariableDeclaration",
49 "start":34,"end":94,"loc":{"start":{"line":2,"column":7,"index":34},"end":{"line":2,"column":67,"index":94}},
50 "declarations": [
51 {
52 "type": "VariableDeclarator",
53 "start":40,"end":93,"loc":{"start":{"line":2,"column":13,"index":40},"end":{"line":2,"column":66,"index":93}},
54 "id": {
55 "type": "ObjectPattern",
56 "start":40,"end":87,"loc":{"start":{"line":2,"column":13,"index":40},"end":{"line":2,"column":60,"index":87}},
57 "properties": [
58 {
59 "type": "ObjectProperty",
60 "start":42,"end":54,"loc":{"start":{"line":2,"column":15,"index":42},"end":{"line":2,"column":27,"index":54}},
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":54,"loc":{"start":{"line":2,"column":18,"index":45},"end":{"line":2,"column":27,"index":54}},
72 "elements": [
73 {
74 "type": "ObjectPattern",
75 "start":46,"end":53,"loc":{"start":{"line":2,"column":19,"index":46},"end":{"line":2,"column":26,"index":53}},
76 "properties": [
77 {
78 "type": "ObjectProperty",
79 "start":48,"end":51,"loc":{"start":{"line":2,"column":21,"index":48},"end":{"line":2,"column":24,"index":51}},
80 "key": {
81 "type": "Identifier",
82 "start":48,"end":51,"loc":{"start":{"line":2,"column":21,"index":48},"end":{"line":2,"column":24,"index":51},"identifierName":"foo"},
83 "name": "foo"
84 },
85 "computed": false,
86 "method": false,
87 "shorthand": true,
88 "value": {
89 "type": "Identifier",
90 "start":48,"end":51,"loc":{"start":{"line":2,"column":21,"index":48},"end":{"line":2,"column":24,"index":51},"identifierName":"foo"},
91 "name": "foo"
92 },
93 "extra": {
94 "shorthand": true
95 }
96 }
97 ]
98 }
99 ]
100 }
101 },
102 {
103 "type": "ObjectProperty",
104 "start":56,"end":85,"loc":{"start":{"line":2,"column":29,"index":56},"end":{"line":2,"column":58,"index":85}},
105 "key": {
106 "type": "Identifier",
107 "start":56,"end":57,"loc":{"start":{"line":2,"column":29,"index":56},"end":{"line":2,"column":30,"index":57},"identifierName":"b"},
108 "name": "b"
109 },
110 "computed": false,
111 "method": false,
112 "shorthand": false,
113 "value": {
114 "type": "ObjectPattern",
115 "start":59,"end":85,"loc":{"start":{"line":2,"column":32,"index":59},"end":{"line":2,"column":58,"index":85}},
116 "properties": [
117 {
118 "type": "ObjectProperty",
119 "start":61,"end":83,"loc":{"start":{"line":2,"column":34,"index":61},"end":{"line":2,"column":56,"index":83}},
120 "key": {
121 "type": "Identifier",
122 "start":61,"end":65,"loc":{"start":{"line":2,"column":34,"index":61},"end":{"line":2,"column":38,"index":65},"identifierName":"foo2"},
123 "name": "foo2"
124 },
125 "computed": false,
126 "method": false,
127 "shorthand": false,
128 "value": {
129 "type": "ArrayPattern",
130 "start":67,"end":83,"loc":{"start":{"line":2,"column":40,"index":67},"end":{"line":2,"column":56,"index":83}},
131 "elements": [
132 {
133 "type": "ObjectPattern",
134 "start":68,"end":82,"loc":{"start":{"line":2,"column":41,"index":68},"end":{"line":2,"column":55,"index":82}},
135 "properties": [
136 {
137 "type": "ObjectProperty",
138 "start":70,"end":80,"loc":{"start":{"line":2,"column":43,"index":70},"end":{"line":2,"column":53,"index":80}},
139 "key": {
140 "type": "Identifier",
141 "start":70,"end":74,"loc":{"start":{"line":2,"column":43,"index":70},"end":{"line":2,"column":47,"index":74},"identifierName":"foo3"},
142 "name": "foo3"
143 },
144 "computed": false,
145 "method": false,
146 "shorthand": false,
147 "value": {
148 "type": "Identifier",
149 "start":76,"end":80,"loc":{"start":{"line":2,"column":49,"index":76},"end":{"line":2,"column":53,"index":80},"identifierName":"foo4"},
150 "name": "foo4"
151 }
152 }
153 ]
154 }
155 ]
156 }
157 }
158 ]
159 }
160 }
161 ]
162 },
163 "init": {
164 "type": "Identifier",
165 "start":90,"end":93,"loc":{"start":{"line":2,"column":63,"index":90},"end":{"line":2,"column":66,"index":93},"identifierName":"bar"},
166 "name": "bar"
167 }
168 }
169 ],
170 "kind": "const"
171 }
172 }
173 ],
174 "directives": []
175 }
176 }