Debian Codegraph @

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

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