Debian Codegraph @

packages/babel-parser/test/fixtures/experimental/decorators-legacy/function-expression-parameter/output.json

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