Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":27,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":27}},
4 "errors": [
5 "SyntaxError: Boolean enum members need to be initialized. Use either `A = true,` or `A = false,` in enum `E`. (2:2)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":27,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":27}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "EnumDeclaration",
15 "start":0,"end":27,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":27}},
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": "EnumBooleanBody",
23 "start":7,"end":27,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":4,"column":1,"index":27}},
24 "hasUnknownMembers": false,
25 "explicitType": false,
26 "members": [
27 {
28 "type": "EnumBooleanMember",
29 "start":16,"end":24,"loc":{"start":{"line":3,"column":2,"index":16},"end":{"line":3,"column":10,"index":24}},
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": "BooleanLiteral",
37 "start":20,"end":24,"loc":{"start":{"line":3,"column":6,"index":20},"end":{"line":3,"column":10,"index":24}},
38 "value": true
39 }
40 }
41 ]
42 }
43 }
44 ],
45 "directives": []
46 }
47 }