Debian Codegraph @

packages/babel-parser/test/fixtures/flow/enum-declaration/invalid-member-name/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: Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `foo`, consider using `Foo`, in enum `E`. (2:2)",
6 "SyntaxError: Enum member names cannot start with lowercase 'a' through 'z'. Instead of using `bar`, consider using `Bar`, in enum `E`. (3:2)"
7 ],
8 "program": {
9 "type": "Program",
10 "start":0,"end":24,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":24}},
11 "sourceType": "script",
12 "interpreter": null,
13 "body": [
14 {
15 "type": "EnumDeclaration",
16 "start":0,"end":24,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":4,"column":1,"index":24}},
17 "id": {
18 "type": "Identifier",
19 "start":5,"end":6,"loc":{"start":{"line":1,"column":5,"index":5},"end":{"line":1,"column":6,"index":6},"identifierName":"E"},
20 "name": "E"
21 },
22 "body": {
23 "type": "EnumStringBody",
24 "start":7,"end":24,"loc":{"start":{"line":1,"column":7,"index":7},"end":{"line":4,"column":1,"index":24}},
25 "hasUnknownMembers": false,
26 "explicitType": false,
27 "members": [
28 {
29 "type": "EnumDefaultedMember",
30 "start":11,"end":14,"loc":{"start":{"line":2,"column":2,"index":11},"end":{"line":2,"column":5,"index":14}},
31 "id": {
32 "type": "Identifier",
33 "start":11,"end":14,"loc":{"start":{"line":2,"column":2,"index":11},"end":{"line":2,"column":5,"index":14},"identifierName":"foo"},
34 "name": "foo"
35 }
36 },
37 {
38 "type": "EnumDefaultedMember",
39 "start":18,"end":21,"loc":{"start":{"line":3,"column":2,"index":18},"end":{"line":3,"column":5,"index":21}},
40 "id": {
41 "type": "Identifier",
42 "start":18,"end":21,"loc":{"start":{"line":3,"column":2,"index":18},"end":{"line":3,"column":5,"index":21},"identifierName":"bar"},
43 "name": "bar"
44 }
45 }
46 ]
47 }
48 }
49 ],
50 "directives": []
51 }
52 }