Debian Codegraph @

packages/babel-parser/test/fixtures/flow/enum-declaration/duplicate-member-name/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":20,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":20}},
4 "errors": [
5 "SyntaxError: Enum member names need to be unique, but the name `A` has already been used before in enum `E`. (3:2)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":20,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":20}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "EnumDeclaration",
15 "start":0,"end":20,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":20}},
16 "id": {
17 "type": "Identifier",
18 "start":5,"end":6,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":6,"index":6},"identifierName":"E"},
19 "name": "E"
20 },
21 "body": {
22 "type": "EnumStringBody",
23 "start":7,"end":20,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":4,"column":1,"index":20}},
24 "hasUnknownMembers": false,
25 "explicitType": false,
26 "members": [
27 {
28 "type": "EnumDefaultedMember",
29 "start":11,"end":12,"loc":{"start":{"line":2,"column":2,"index":11},"end":{"line":2,"column":3,"index":12}},
30 "id": {
31 "type": "Identifier",
32 "start":11,"end":12,"loc":{"start":{"line":2,"column":2,"index":11},"end":{"line":2,"column":3,"index":12},"identifierName":"A"},
33 "name": "A"
34 }
35 },
36 {
37 "type": "EnumDefaultedMember",
38 "start":16,"end":17,"loc":{"start":{"line":3,"column":2,"index":16},"end":{"line":3,"column":3,"index":17}},
39 "id": {
40 "type": "Identifier",
41 "start":16,"end":17,"loc":{"start":{"line":3,"column":2,"index":16},"end":{"line":3,"column":3,"index":17},"identifierName":"A"},
42 "name": "A"
43 }
44 }
45 ]
46 }
47 }
48 ],
49 "directives": []
50 }
51 }