Debian Codegraph @

packages/babel-parser/test/fixtures/es2022/module-string-names/duplicate-exported-binding-check/output.json

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