Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/decorators/no-class-method-parameter/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":38,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":38}},
4 "errors": [
5 "SyntaxError: Decorators cannot be used to decorate parameters. (2:14)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":38,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":38}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "ClassDeclaration",
15 "start":0,"end":38,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":38}},
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":38,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":3,"column":1,"index":38}},
25 "body": [
26 {
27 "type": "ClassMethod",
28 "start":14,"end":36,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":24,"index":36}},
29 "static": false,
30 "key": {
31 "type": "Identifier",
32 "start":14,"end":25,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":13,"index":25},"identifierName":"constructor"},
33 "name": "constructor"
34 },
35 "computed": false,
36 "kind": "constructor",
37 "id": null,
38 "generator": false,
39 "async": false,
40 "params": [
41 {
42 "type": "Identifier",
43 "start":31,"end":32,"loc":{"start":{"line":2,"column":19,"index":31},"end":{"line":2,"column":20,"index":32},"identifierName":"x"},
44 "name": "x",
45 "decorators": [
46 {
47 "type": "Decorator",
48 "start":26,"end":30,"loc":{"start":{"line":2,"column":14,"index":26},"end":{"line":2,"column":18,"index":30}},
49 "expression": {
50 "type": "Identifier",
51 "start":27,"end":30,"loc":{"start":{"line":2,"column":15,"index":27},"end":{"line":2,"column":18,"index":30},"identifierName":"foo"},
52 "name": "foo"
53 }
54 }
55 ]
56 }
57 ],
58 "body": {
59 "type": "BlockStatement",
60 "start":34,"end":36,"loc":{"start":{"line":2,"column":22,"index":34},"end":{"line":2,"column":24,"index":36}},
61 "body": [],
62 "directives": []
63 }
64 }
65 ]
66 }
67 }
68 ],
69 "directives": []
70 }
71 }