Debian Codegraph @

packages/babel-parser/test/fixtures/flow/this-annotation/function-declaration/output.json

raw
1 {
2 "type": "File",
3 "start":0,"end":149,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":29,"index":149}},
4 "program": {
5 "type": "Program",
6 "start":0,"end":149,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":7,"column":29,"index":149}},
7 "sourceType": "module",
8 "interpreter": null,
9 "body": [
10 {
11 "type": "FunctionDeclaration",
12 "start":0,"end":46,"loc":{"start":{"line":1,"column":0,"index":0},"end":{"line":1,"column":46,"index":46}},
13 "id": {
14 "type": "Identifier",
15 "start":9,"end":12,"loc":{"start":{"line":1,"column":9,"index":9},"end":{"line":1,"column":12,"index":12},"identifierName":"foo"},
16 "name": "foo"
17 },
18 "generator": false,
19 "async": false,
20 "params": [
21 {
22 "type": "Identifier",
23 "start":14,"end":27,"loc":{"start":{"line":1,"column":14,"index":14},"end":{"line":1,"column":27,"index":27},"identifierName":"this"},
24 "name": "this",
25 "typeAnnotation": {
26 "type": "TypeAnnotation",
27 "start":19,"end":27,"loc":{"start":{"line":1,"column":19,"index":19},"end":{"line":1,"column":27,"index":27}},
28 "typeAnnotation": {
29 "type": "NumberTypeAnnotation",
30 "start":21,"end":27,"loc":{"start":{"line":1,"column":21,"index":21},"end":{"line":1,"column":27,"index":27}}
31 }
32 }
33 },
34 {
35 "type": "Identifier",
36 "start":29,"end":39,"loc":{"start":{"line":1,"column":29,"index":29},"end":{"line":1,"column":39,"index":39},"identifierName":"a"},
37 "name": "a",
38 "typeAnnotation": {
39 "type": "TypeAnnotation",
40 "start":31,"end":39,"loc":{"start":{"line":1,"column":31,"index":31},"end":{"line":1,"column":39,"index":39}},
41 "typeAnnotation": {
42 "type": "StringTypeAnnotation",
43 "start":33,"end":39,"loc":{"start":{"line":1,"column":33,"index":33},"end":{"line":1,"column":39,"index":39}}
44 }
45 }
46 },
47 {
48 "type": "Identifier",
49 "start":41,"end":42,"loc":{"start":{"line":1,"column":41,"index":41},"end":{"line":1,"column":42,"index":42},"identifierName":"b"},
50 "name": "b"
51 }
52 ],
53 "body": {
54 "type": "BlockStatement",
55 "start":44,"end":46,"loc":{"start":{"line":1,"column":44,"index":44},"end":{"line":1,"column":46,"index":46}},
56 "body": [],
57 "directives": []
58 }
59 },
60 {
61 "type": "FunctionDeclaration",
62 "start":48,"end":79,"loc":{"start":{"line":3,"column":0,"index":48},"end":{"line":3,"column":31,"index":79}},
63 "id": {
64 "type": "Identifier",
65 "start":57,"end":60,"loc":{"start":{"line":3,"column":9,"index":57},"end":{"line":3,"column":12,"index":60},"identifierName":"bar"},
66 "name": "bar"
67 },
68 "generator": false,
69 "async": false,
70 "params": [
71 {
72 "type": "Identifier",
73 "start":62,"end":75,"loc":{"start":{"line":3,"column":14,"index":62},"end":{"line":3,"column":27,"index":75},"identifierName":"this"},
74 "name": "this",
75 "typeAnnotation": {
76 "type": "TypeAnnotation",
77 "start":67,"end":75,"loc":{"start":{"line":3,"column":19,"index":67},"end":{"line":3,"column":27,"index":75}},
78 "typeAnnotation": {
79 "type": "NumberTypeAnnotation",
80 "start":69,"end":75,"loc":{"start":{"line":3,"column":21,"index":69},"end":{"line":3,"column":27,"index":75}}
81 }
82 }
83 }
84 ],
85 "body": {
86 "type": "BlockStatement",
87 "start":77,"end":79,"loc":{"start":{"line":3,"column":29,"index":77},"end":{"line":3,"column":31,"index":79}},
88 "body": [],
89 "directives": []
90 }
91 },
92 {
93 "type": "FunctionDeclaration",
94 "start":81,"end":118,"loc":{"start":{"line":5,"column":0,"index":81},"end":{"line":5,"column":37,"index":118}},
95 "id": {
96 "type": "Identifier",
97 "start":90,"end":93,"loc":{"start":{"line":5,"column":9,"index":90},"end":{"line":5,"column":12,"index":93},"identifierName":"baz"},
98 "name": "baz"
99 },
100 "generator": false,
101 "async": false,
102 "params": [
103 {
104 "type": "Identifier",
105 "start":95,"end":108,"loc":{"start":{"line":5,"column":14,"index":95},"end":{"line":5,"column":27,"index":108},"identifierName":"this"},
106 "name": "this",
107 "typeAnnotation": {
108 "type": "TypeAnnotation",
109 "start":100,"end":108,"loc":{"start":{"line":5,"column":19,"index":100},"end":{"line":5,"column":27,"index":108}},
110 "typeAnnotation": {
111 "type": "NumberTypeAnnotation",
112 "start":102,"end":108,"loc":{"start":{"line":5,"column":21,"index":102},"end":{"line":5,"column":27,"index":108}}
113 }
114 }
115 },
116 {
117 "type": "RestElement",
118 "start":110,"end":114,"loc":{"start":{"line":5,"column":29,"index":110},"end":{"line":5,"column":33,"index":114}},
119 "argument": {
120 "type": "Identifier",
121 "start":113,"end":114,"loc":{"start":{"line":5,"column":32,"index":113},"end":{"line":5,"column":33,"index":114},"identifierName":"a"},
122 "name": "a"
123 }
124 }
125 ],
126 "body": {
127 "type": "BlockStatement",
128 "start":116,"end":118,"loc":{"start":{"line":5,"column":35,"index":116},"end":{"line":5,"column":37,"index":118}},
129 "body": [],
130 "directives": []
131 }
132 },
133 {
134 "type": "FunctionDeclaration",
135 "start":120,"end":149,"loc":{"start":{"line":7,"column":0,"index":120},"end":{"line":7,"column":29,"index":149}},
136 "id": {
137 "type": "Identifier",
138 "start":129,"end":132,"loc":{"start":{"line":7,"column":9,"index":129},"end":{"line":7,"column":12,"index":132},"identifierName":"qux"},
139 "name": "qux"
140 },
141 "generator": false,
142 "async": false,
143 "typeParameters": {
144 "type": "TypeParameterDeclaration",
145 "start":132,"end":135,"loc":{"start":{"line":7,"column":12,"index":132},"end":{"line":7,"column":15,"index":135}},
146 "params": [
147 {
148 "type": "TypeParameter",
149 "start":133,"end":134,"loc":{"start":{"line":7,"column":13,"index":133},"end":{"line":7,"column":14,"index":134}},
150 "name": "T",
151 "variance": null
152 }
153 ]
154 },
155 "params": [
156 {
157 "type": "Identifier",
158 "start":137,"end":145,"loc":{"start":{"line":7,"column":17,"index":137},"end":{"line":7,"column":25,"index":145},"identifierName":"this"},
159 "name": "this",
160 "typeAnnotation": {
161 "type": "TypeAnnotation",
162 "start":142,"end":145,"loc":{"start":{"line":7,"column":22,"index":142},"end":{"line":7,"column":25,"index":145}},
163 "typeAnnotation": {
164 "type": "GenericTypeAnnotation",
165 "start":144,"end":145,"loc":{"start":{"line":7,"column":24,"index":144},"end":{"line":7,"column":25,"index":145}},
166 "typeParameters": null,
167 "id": {
168 "type": "Identifier",
169 "start":144,"end":145,"loc":{"start":{"line":7,"column":24,"index":144},"end":{"line":7,"column":25,"index":145},"identifierName":"T"},
170 "name": "T"
171 }
172 }
173 }
174 }
175 ],
176 "body": {
177 "type": "BlockStatement",
178 "start":147,"end":149,"loc":{"start":{"line":7,"column":27,"index":147},"end":{"line":7,"column":29,"index":149}},
179 "body": [],
180 "directives": []
181 }
182 }
183 ],
184 "directives": []
185 }
186 }