Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/decorators/class-expression/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":58,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":58}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":58,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":58}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "VariableDeclaration",
12 "start":0,"end":58,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":6,"column":1,"index":58}},
13 "declarations": [
14 {
15 "type": "VariableDeclarator",
16 "start":4,"end":58,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":6,"column":1,"index":58}},
17 "id": {
18 "type": "Identifier",
19 "start":4,"end":7,"loc":{"start":{"line":1,"column":4,"index":4},"end":{"line":1,"column":7,"index":7},"identifierName":"foo"},
20 "name": "foo"
21 },
22 "init": {
23 "type": "ClassExpression",
24 "start":10,"end":58,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":6,"column":1,"index":58}},
25 "decorators": [
26 {
27 "type": "Decorator",
28 "start":10,"end":14,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":1,"column":14,"index":14}},
29 "expression": {
30 "type": "Identifier",
31 "start":11,"end":14,"loc":{"start":{"line":1,"column":11,"index":11},"end":{"line":1,"column":14,"index":14},"identifierName":"dec"},
32 "name": "dec"
33 }
34 }
35 ],
36 "id": {
37 "type": "Identifier",
38 "start":21,"end":24,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":24,"index":24},"identifierName":"Bar"},
39 "name": "Bar"
40 },
41 "superClass": null,
42 "body": {
43 "type": "ClassBody",
44 "start":25,"end":58,"loc":{"start":{"line":1,"column":25,"index":25},"end":{"line":6,"column":1,"index":58}},
45 "body": [
46 {
47 "type": "ClassMethod",
48 "start":29,"end":56,"loc":{"start":{"line":2,"column":2,"index":29},"end":{"line":5,"column":3,"index":56}},
49 "decorators": [
50 {
51 "type": "Decorator",
52 "start":29,"end":33,"loc":{"start":{"line":2,"column":2,"index":29},"end":{"line":2,"column":6,"index":33}},
53 "expression": {
54 "type": "Identifier",
55 "start":30,"end":33,"loc":{"start":{"line":2,"column":3,"index":30},"end":{"line":2,"column":6,"index":33},"identifierName":"baz"},
56 "name": "baz"
57 }
58 }
59 ],
60 "static": false,
61 "key": {
62 "type": "Identifier",
63 "start":36,"end":39,"loc":{"start":{"line":3,"column":2,"index":36},"end":{"line":3,"column":5,"index":39},"identifierName":"bam"},
64 "name": "bam"
65 },
66 "computed": false,
67 "kind": "method",
68 "id": null,
69 "generator": false,
70 "async": false,
71 "params": [],
72 "body": {
73 "type": "BlockStatement",
74 "start":42,"end":56,"loc":{"start":{"line":3,"column":8,"index":42},"end":{"line":5,"column":3,"index":56}},
75 "body": [
76 {
77 "type": "ExpressionStatement",
78 "start":48,"end":52,"loc":{"start":{"line":4,"column":4,"index":48},"end":{"line":4,"column":8,"index":52}},
79 "expression": {
80 "type": "CallExpression",
81 "start":48,"end":51,"loc":{"start":{"line":4,"column":4,"index":48},"end":{"line":4,"column":7,"index":51}},
82 "callee": {
83 "type": "Identifier",
84 "start":48,"end":49,"loc":{"start":{"line":4,"column":4,"index":48},"end":{"line":4,"column":5,"index":49},"identifierName":"f"},
85 "name": "f"
86 },
87 "arguments": []
88 }
89 }
90 ],
91 "directives": []
92 }
93 }
94 ]
95 }
96 }
97 }
98 ],
99 "kind": "var"
100 }
101 ],
102 "directives": []
103 }
104 }