Debian Codegraph @

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

raw
1 {
2 "type": "File",
3 "start":0,"end":67,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":67}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":67,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":67}},
7 "sourceType": "script",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "ClassDeclaration",
12 "start":0,"end":67,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":3,"column":1,"index":67}},
13 "id": {
14 "type": "Identifier",
15 "start":6,"end":9,"loc":{"start":{"line":1,"column":6,"index":6},"end":{"line":1,"column":9,"index":9},"identifierName":"Foo"},
16 "name": "Foo"
17 },
18 "superClass": null,
19 "body": {
20 "type": "ClassBody",
21 "start":10,"end":67,"loc":{"start":{"line":1,"column":10,"index":10},"end":{"line":3,"column":1,"index":67}},
22 "body": [
23 {
24 "type": "ClassMethod",
25 "start":14,"end":65,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":53,"index":65}},
26 "static": false,
27 "key": {
28 "type": "Identifier",
29 "start":14,"end":25,"loc":{"start":{"line":2,"column":2,"index":14},"end":{"line":2,"column":13,"index":25},"identifierName":"constructor"},
30 "name": "constructor"
31 },
32 "computed": false,
33 "kind": "constructor",
34 "id": null,
35 "generator": false,
36 "async": false,
37 "params": [
38 {
39 "type": "Identifier",
40 "start":33,"end":34,"loc":{"start":{"line":2,"column":21,"index":33},"end":{"line":2,"column":22,"index":34},"identifierName":"x"},
41 "name": "x",
42 "decorators": [
43 {
44 "type": "Decorator",
45 "start":26,"end":32,"loc":{"start":{"line":2,"column":14,"index":26},"end":{"line":2,"column":20,"index":32}},
46 "expression": {
47 "type": "CallExpression",
48 "start":27,"end":32,"loc":{"start":{"line":2,"column":15,"index":27},"end":{"line":2,"column":20,"index":32}},
49 "callee": {
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 "arguments": []
55 }
56 }
57 ]
58 },
59 {
60 "type": "Identifier",
61 "start":60,"end":61,"loc":{"start":{"line":2,"column":48,"index":60},"end":{"line":2,"column":49,"index":61},"identifierName":"y"},
62 "name": "y",
63 "decorators": [
64 {
65 "type": "Decorator",
66 "start":36,"end":52,"loc":{"start":{"line":2,"column":24,"index":36},"end":{"line":2,"column":40,"index":52}},
67 "expression": {
68 "type": "CallExpression",
69 "start":37,"end":52,"loc":{"start":{"line":2,"column":25,"index":37},"end":{"line":2,"column":40,"index":52}},
70 "callee": {
71 "type": "Identifier",
72 "start":37,"end":40,"loc":{"start":{"line":2,"column":25,"index":37},"end":{"line":2,"column":28,"index":40},"identifierName":"bar"},
73 "name": "bar"
74 },
75 "arguments": [
76 {
77 "type": "ObjectExpression",
78 "start":41,"end":51,"loc":{"start":{"line":2,"column":29,"index":41},"end":{"line":2,"column":39,"index":51}},
79 "properties": [
80 {
81 "type": "ObjectProperty",
82 "start":43,"end":49,"loc":{"start":{"line":2,"column":31,"index":43},"end":{"line":2,"column":37,"index":49}},
83 "method": false,
84 "key": {
85 "type": "Identifier",
86 "start":43,"end":44,"loc":{"start":{"line":2,"column":31,"index":43},"end":{"line":2,"column":32,"index":44},"identifierName":"a"},
87 "name": "a"
88 },
89 "computed": false,
90 "shorthand": false,
91 "value": {
92 "type": "NumericLiteral",
93 "start":46,"end":49,"loc":{"start":{"line":2,"column":34,"index":46},"end":{"line":2,"column":37,"index":49}},
94 "extra": {
95 "rawValue": 123,
96 "raw": "123"
97 },
98 "value": 123
99 }
100 }
101 ]
102 }
103 ]
104 }
105 },
106 {
107 "type": "Decorator",
108 "start":53,"end":59,"loc":{"start":{"line":2,"column":41,"index":53},"end":{"line":2,"column":47,"index":59}},
109 "expression": {
110 "type": "CallExpression",
111 "start":54,"end":59,"loc":{"start":{"line":2,"column":42,"index":54},"end":{"line":2,"column":47,"index":59}},
112 "callee": {
113 "type": "Identifier",
114 "start":54,"end":57,"loc":{"start":{"line":2,"column":42,"index":54},"end":{"line":2,"column":45,"index":57},"identifierName":"baz"},
115 "name": "baz"
116 },
117 "arguments": []
118 }
119 }
120 ]
121 }
122 ],
123 "body": {
124 "type": "BlockStatement",
125 "start":63,"end":65,"loc":{"start":{"line":2,"column":51,"index":63},"end":{"line":2,"column":53,"index":65}},
126 "body": [],
127 "directives": []
128 }
129 }
130 ]
131 }
132 }
133 ],
134 "directives": []
135 }
136 }