Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":31,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":31}},
4 "errors": [
5 "SyntaxError: The `declare` modifier can only appear on class fields. (2:2)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":31,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":31}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":31,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":31}},
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":31,"loc":{"start":{"line":1,"column":8,"index":8},"end":{"line":3,"column":1,"index":31}},
25 "body": [
26 {
27 "type": "ClassPrivateMethod",
28 "start":12,"end":29,"loc":{"start":{"line":2,"column":2,"index":12},"end":{"line":2,"column":19,"index":29}},
29 "declare": true,
30 "static": false,
31 "key": {
32 "type": "PrivateName",
33 "start":20,"end":24,"loc":{"start":{"line":2,"column":10,"index":20},"end":{"line":2,"column":14,"index":24}},
34 "id": {
35 "type": "Identifier",
36 "start":21,"end":24,"loc":{"start":{"line":2,"column":11,"index":21},"end":{"line":2,"column":14,"index":24},"identifierName":"foo"},
37 "name": "foo"
38 }
39 },
40 "kind": "method",
41 "id": null,
42 "generator": false,
43 "async": false,
44 "params": [],
45 "body": {
46 "type": "BlockStatement",
47 "start":27,"end":29,"loc":{"start":{"line":2,"column":17,"index":27},"end":{"line":2,"column":19,"index":29}},
48 "body": [],
49 "directives": []
50 }
51 }
52 ]
53 }
54 }
55 ],
56 "directives": []
57 }
58 }