Debian Codegraph @

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

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