Debian Codegraph @

packages/babel-parser/test/fixtures/flow/regression/issue-321/output.json

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