Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":25,"index":53}},
4 "errors": [
5 "SyntaxError: Identifier 'foo' has already been declared. (2:16)",
6 "SyntaxError: `foo` has already been exported. Exported identifiers must be unique. (2:0)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":53,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":2,"column":25,"index":53}},
11 "sourceType": "module",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "ExportNamedDeclaration",
16 "start":0,"end":27,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":27,"index":27}},
17 "specifiers": [],
18 "source": null,
19 "declaration": {
20 "type": "VariableDeclaration",
21 "start":7,"end":27,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":1,"column":27,"index":27}},
22 "declarations": [
23 {
24 "type": "VariableDeclarator",
25 "start":13,"end":26,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":26,"index":26}},
26 "id": {
27 "type": "ObjectPattern",
28 "start":13,"end":20,"loc":{"start":{"line":1,"column":13,"index":13},"end":{"line":1,"column":20,"index":20}},
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 },
52 "init": {
53 "type": "Identifier",
54 "start":23,"end":26,"loc":{"start":{"line":1,"column":23,"index":23},"end":{"line":1,"column":26,"index":26},"identifierName":"bar"},
55 "name": "bar"
56 }
57 }
58 ],
59 "kind": "const"
60 }
61 },
62 {
63 "type": "ExportNamedDeclaration",
64 "start":28,"end":52,"loc":{"start":{"line":2,"column":0,"index":28},"end":{"line":2,"column":24,"index":52}},
65 "specifiers": [],
66 "source": null,
67 "declaration": {
68 "type": "FunctionDeclaration",
69 "start":35,"end":52,"loc":{"start":{"line":2,"column":7,"index":35},"end":{"line":2,"column":24,"index":52}},
70 "id": {
71 "type": "Identifier",
72 "start":44,"end":47,"loc":{"start":{"line":2,"column":16,"index":44},"end":{"line":2,"column":19,"index":47},"identifierName":"foo"},
73 "name": "foo"
74 },
75 "generator": false,
76 "async": false,
77 "params": [],
78 "body": {
79 "type": "BlockStatement",
80 "start":50,"end":52,"loc":{"start":{"line":2,"column":22,"index":50},"end":{"line":2,"column":24,"index":52}},
81 "body": [],
82 "directives": []
83 }
84 }
85 },
86 {
87 "type": "EmptyStatement",
88 "start":52,"end":53,"loc":{"start":{"line":2,"column":24,"index":52},"end":{"line":2,"column":25,"index":53}}
89 }
90 ],
91 "directives": []
92 }
93 }