Debian Codegraph @

packages/babel-parser/test/fixtures/flow/this-annotation/this-setter/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":40}},
4 "errors": [
5 "SyntaxError: A setter cannot have a `this` parameter. (2:10)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":40}},
10 "sourceType": "module",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":40,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":40}},
16 "id": {
17 "type": "Identifier",
18 "start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"},
19 "name": "Foo"
20 },
21 "superClass": null,
22 "body": {
23 "type": "ClassBody",
24 "start":10,"end":40,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":3,"column":1,"index":40}},
25 "body": [
26 {
27 "type": "ClassMethod",
28 "start":14,"end":38,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":26,"index":38}},
29 "static": false,
30 "key": {
31 "type": "Identifier",
32 "start":18,"end":21,"loc":{"start":{"line":2,"column":6,"index":18},"end":{"line":2,"column":9,"index":21},"identifierName":"foo"},
33 "name": "foo"
34 },
35 "computed": false,
36 "kind": "set",
37 "id": null,
38 "generator": false,
39 "async": false,
40 "params": [
41 {
42 "type": "Identifier",
43 "start":22,"end":34,"loc":{"start":{"line":2,"column":10,"index":22},"end":{"line":2,"column":22,"index":34},"identifierName":"this"},
44 "name": "this",
45 "typeAnnotation": {
46 "type": "TypeAnnotation",
47 "start":26,"end":34,"loc":{"start":{"line":2,"column":14,"index":26},"end":{"line":2,"column":22,"index":34}},
48 "typeAnnotation": {
49 "type": "StringTypeAnnotation",
50 "start":28,"end":34,"loc":{"start":{"line":2,"column":16,"index":28},"end":{"line":2,"column":22,"index":34}}
51 }
52 }
53 }
54 ],
55 "body": {
56 "type": "BlockStatement",
57 "start":36,"end":38,"loc":{"start":{"line":2,"column":24,"index":36},"end":{"line":2,"column":26,"index":38}},
58 "body": [],
59 "directives": []
60 }
61 }
62 ]
63 }
64 }
65 ],
66 "directives": []
67 }
68 }