Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/decorators/no-object-method-parameters/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":34,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":2,"index":34}},
4 "errors": [
5 "SyntaxError: Decorators cannot be used to decorate parameters. (2:9)"
6 ],
7 "program": {
8 "type": "Program",
9 "start":0,"end":34,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":2,"index":34}},
10 "sourceType": "script",
11 "interpreter": null,
12 "body": [
13 {
14 "type": "VariableDeclaration",
15 "start":0,"end":34,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":2,"index":34}},
16 "declarations": [
17 {
18 "type": "VariableDeclarator",
19 "start":4,"end":33,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":3,"column":1,"index":33}},
20 "id": {
21 "type": "Identifier",
22 "start":4,"end":7,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":7,"index":7},"identifierName":"obj"},
23 "name": "obj"
24 },
25 "init": {
26 "type": "ObjectExpression",
27 "start":10,"end":33,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":3,"column":1,"index":33}},
28 "properties": [
29 {
30 "type": "ObjectMethod",
31 "start":14,"end":31,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":19,"index":31}},
32 "method": true,
33 "key": {
34 "type": "Identifier",
35 "start":14,"end":20,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":8,"index":20},"identifierName":"method"},
36 "name": "method"
37 },
38 "computed": false,
39 "kind": "method",
40 "id": null,
41 "generator": false,
42 "async": false,
43 "params": [
44 {
45 "type": "Identifier",
46 "start":26,"end":27,"loc":{"start":{"line":2,"column":14,"index":26},"end":{"line":2,"column":15,"index":27},"identifierName":"x"},
47 "name": "x",
48 "decorators": [
49 {
50 "type": "Decorator",
51 "start":21,"end":25,"loc":{"start":{"line":2,"column":9,"index":21},"end":{"line":2,"column":13,"index":25}},
52 "expression": {
53 "type": "Identifier",
54 "start":22,"end":25,"loc":{"start":{"line":2,"column":10,"index":22},"end":{"line":2,"column":13,"index":25},"identifierName":"foo"},
55 "name": "foo"
56 }
57 }
58 ]
59 }
60 ],
61 "body": {
62 "type": "BlockStatement",
63 "start":29,"end":31,"loc":{"start":{"line":2,"column":17,"index":29},"end":{"line":2,"column":19,"index":31}},
64 "body": [],
65 "directives": []
66 }
67 }
68 ]
69 }
70 }
71 ],
72 "kind": "var"
73 }
74 ],
75 "directives": []
76 }
77 }