Debian Codegraph @

packages/babel-parser/test/fixtures/flow/enum-declaration/number-member-not-initialized-implicit/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":24,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":24}},
4 "errors": [
5 "SyntaxError: Number enum members need to be initialized, e.g. `A = 1` in enum `E`. (2:2)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":24,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":24}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "EnumDeclaration",
15 "start":0,"end":24,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":24}},
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": "EnumNumberBody",
23 "start":7,"end":24,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":4,"column":1,"index":24}},
24 "hasUnknownMembers": false,
25 "explicitType": false,
26 "members": [
27 {
28 "type": "EnumNumberMember",
29 "start":16,"end":21,"loc":{"start":{"line":3,"column":2,"index":16},"end":{"line":3,"column":7,"index":21}},
30 "id": {
31 "type": "Identifier",
32 "start":16,"end":17,"loc":{"start":{"line":3,"column":2,"index":16},"end":{"line":3,"column":3,"index":17},"identifierName":"B"},
33 "name": "B"
34 },
35 "init": {
36 "type": "NumericLiteral",
37 "start":20,"end":21,"loc":{"start":{"line":3,"column":6,"index":20},"end":{"line":3,"column":7,"index":21}},
38 "extra": {
39 "rawValue": 1,
40 "raw": "1"
41 },
42 "value": 1
43 }
44 }
45 ]
46 }
47 }
48 ],
49 "directives": []
50 }
51 }