Debian Codegraph @

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

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