Debian Codegraph @

packages/babel-parser/test/fixtures/flow/class-private-property/declare-field-initializer/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":30,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":30}},
4 "errors": [
5 "SyntaxError: Initializers are not allowed in fields with the `declare` modifier. (2:17)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":30,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":30}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":30,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":30}},
16 "id": {
17 "type": "Identifier",
18 "start":6,"end":7,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":7,"index":7},"identifierName":"A"},
19 "name": "A"
20 },
21 "superClass": null,
22 "body": {
23 "type": "ClassBody",
24 "start":8,"end":30,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":3,"column":1,"index":30}},
25 "body": [
26 {
27 "type": "ClassPrivateProperty",
28 "start":12,"end":28,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":18,"index":28}},
29 "declare": true,
30 "static": false,
31 "variance": null,
32 "key": {
33 "type": "PrivateName",
34 "start":20,"end":24,"loc":{"start":{"line":2,"column":10,"index":20},"end":{"line":2,"column":14,"index":24}},
35 "id": {
36 "type": "Identifier",
37 "start":21,"end":24,"loc":{"start":{"line":2,"column":11,"index":21},"end":{"line":2,"column":14,"index":24},"identifierName":"foo"},
38 "name": "foo"
39 }
40 },
41 "value": {
42 "type": "NumericLiteral",
43 "start":27,"end":28,"loc":{"start":{"line":2,"column":17,"index":27},"end":{"line":2,"column":18,"index":28}},
44 "extra": {
45 "rawValue": 2,
46 "raw": "2"
47 },
48 "value": 2
49 }
50 }
51 ]
52 }
53 }
54 ],
55 "directives": []
56 }
57 }