@openrewrite/rewrite 8.72.2 → 8.72.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/execution.js +3 -16
- package/dist/execution.js.map +1 -1
- package/dist/index.js +34 -49
- package/dist/index.js.map +1 -1
- package/dist/java/markers.js +12 -29
- package/dist/java/markers.js.map +1 -1
- package/dist/java/print.js +2 -13
- package/dist/java/print.js.map +1 -1
- package/dist/java/rpc.js +1344 -1725
- package/dist/java/rpc.js.map +1 -1
- package/dist/java/type-visitor.js +143 -184
- package/dist/java/type-visitor.js.map +1 -1
- package/dist/java/visitor.js +1072 -1249
- package/dist/java/visitor.js.map +1 -1
- package/dist/javascript/add-import.js +495 -534
- package/dist/javascript/add-import.js.map +1 -1
- package/dist/javascript/autodetect.js +116 -159
- package/dist/javascript/autodetect.js.map +1 -1
- package/dist/javascript/cleanup/add-parse-int-radix.js +41 -57
- package/dist/javascript/cleanup/add-parse-int-radix.js.map +1 -1
- package/dist/javascript/cleanup/prefer-optional-chain.js +89 -105
- package/dist/javascript/cleanup/prefer-optional-chain.js.map +1 -1
- package/dist/javascript/cleanup/use-object-property-shorthand.js +74 -95
- package/dist/javascript/cleanup/use-object-property-shorthand.js.map +1 -1
- package/dist/javascript/comparator.js +815 -1167
- package/dist/javascript/comparator.js.map +1 -1
- package/dist/javascript/dependency-workspace.js +206 -219
- package/dist/javascript/dependency-workspace.js.map +1 -1
- package/dist/javascript/format/format.js +682 -908
- package/dist/javascript/format/format.js.map +1 -1
- package/dist/javascript/format/minimum-viable-spacing-visitor.js +152 -231
- package/dist/javascript/format/minimum-viable-spacing-visitor.js.map +1 -1
- package/dist/javascript/format/normalize-whitespace-visitor.js +12 -31
- package/dist/javascript/format/normalize-whitespace-visitor.js.map +1 -1
- package/dist/javascript/format/prettier-config-loader.js +134 -153
- package/dist/javascript/format/prettier-config-loader.js.map +1 -1
- package/dist/javascript/format/prettier-format.js +112 -129
- package/dist/javascript/format/prettier-format.js.map +1 -1
- package/dist/javascript/format/tabs-and-indents-visitor.js +112 -136
- package/dist/javascript/format/tabs-and-indents-visitor.js.map +1 -1
- package/dist/javascript/markers.js +59 -92
- package/dist/javascript/markers.js.map +1 -1
- package/dist/javascript/migrate/es6/modernize-octal-escape-sequences.js +39 -52
- package/dist/javascript/migrate/es6/modernize-octal-escape-sequences.js.map +1 -1
- package/dist/javascript/migrate/es6/modernize-octal-literals.js +25 -38
- package/dist/javascript/migrate/es6/modernize-octal-literals.js.map +1 -1
- package/dist/javascript/migrate/es6/remove-duplicate-object-keys.js +66 -82
- package/dist/javascript/migrate/es6/remove-duplicate-object-keys.js.map +1 -1
- package/dist/javascript/migrate/typescript/export-assignment-to-export-default.js +10 -23
- package/dist/javascript/migrate/typescript/export-assignment-to-export-default.js.map +1 -1
- package/dist/javascript/node-resolution-result.js +137 -166
- package/dist/javascript/node-resolution-result.js.map +1 -1
- package/dist/javascript/package-json-parser.js +312 -343
- package/dist/javascript/package-json-parser.js.map +1 -1
- package/dist/javascript/package-manager.js +145 -170
- package/dist/javascript/package-manager.js.map +1 -1
- package/dist/javascript/parser.d.ts.map +1 -1
- package/dist/javascript/parser.js +94 -68
- package/dist/javascript/parser.js.map +1 -1
- package/dist/javascript/print.js +1572 -1835
- package/dist/javascript/print.js.map +1 -1
- package/dist/javascript/project-parser.js +151 -172
- package/dist/javascript/project-parser.js.map +1 -1
- package/dist/javascript/recipes/add-dependency.js +140 -175
- package/dist/javascript/recipes/add-dependency.js.map +1 -1
- package/dist/javascript/recipes/async-callback-in-sync-array-method.js +20 -36
- package/dist/javascript/recipes/async-callback-in-sync-array-method.js.map +1 -1
- package/dist/javascript/recipes/auto-format.js +3 -14
- package/dist/javascript/recipes/auto-format.js.map +1 -1
- package/dist/javascript/recipes/change-import.js +447 -495
- package/dist/javascript/recipes/change-import.js.map +1 -1
- package/dist/javascript/recipes/order-imports.js +162 -175
- package/dist/javascript/recipes/order-imports.js.map +1 -1
- package/dist/javascript/recipes/upgrade-dependency-version.js +167 -197
- package/dist/javascript/recipes/upgrade-dependency-version.js.map +1 -1
- package/dist/javascript/recipes/upgrade-transitive-dependency-version.js +166 -193
- package/dist/javascript/recipes/upgrade-transitive-dependency-version.js.map +1 -1
- package/dist/javascript/remove-import.js +689 -724
- package/dist/javascript/remove-import.js.map +1 -1
- package/dist/javascript/rpc.js +1007 -1332
- package/dist/javascript/rpc.js.map +1 -1
- package/dist/javascript/search/find-dependency.js +84 -110
- package/dist/javascript/search/find-dependency.js.map +1 -1
- package/dist/javascript/search/uses-method.js +5 -19
- package/dist/javascript/search/uses-method.js.map +1 -1
- package/dist/javascript/search/uses-type.js +9 -20
- package/dist/javascript/search/uses-type.js.map +1 -1
- package/dist/javascript/templating/comparator.js +737 -822
- package/dist/javascript/templating/comparator.js.map +1 -1
- package/dist/javascript/templating/engine.js +211 -245
- package/dist/javascript/templating/engine.js.map +1 -1
- package/dist/javascript/templating/pattern.js +169 -190
- package/dist/javascript/templating/pattern.js.map +1 -1
- package/dist/javascript/templating/placeholder-replacement.js +172 -210
- package/dist/javascript/templating/placeholder-replacement.js.map +1 -1
- package/dist/javascript/templating/rewrite.js +75 -97
- package/dist/javascript/templating/rewrite.js.map +1 -1
- package/dist/javascript/templating/template.js +69 -82
- package/dist/javascript/templating/template.js.map +1 -1
- package/dist/javascript/tree-debug.js +109 -137
- package/dist/javascript/tree-debug.js.map +1 -1
- package/dist/javascript/visitor.js +1090 -1254
- package/dist/javascript/visitor.js.map +1 -1
- package/dist/json/print.js +72 -103
- package/dist/json/print.js.map +1 -1
- package/dist/json/rpc.js +120 -181
- package/dist/json/rpc.js.map +1 -1
- package/dist/json/visitor.js +69 -100
- package/dist/json/visitor.js.map +1 -1
- package/dist/marketplace.js +20 -33
- package/dist/marketplace.js.map +1 -1
- package/dist/parse-error.js +41 -62
- package/dist/parse-error.js.map +1 -1
- package/dist/parser.js +7 -18
- package/dist/parser.js.map +1 -1
- package/dist/path-utils.js +46 -59
- package/dist/path-utils.js.map +1 -1
- package/dist/preconditions.js +30 -47
- package/dist/preconditions.js.map +1 -1
- package/dist/print.js +6 -19
- package/dist/print.js.map +1 -1
- package/dist/recipe.js +42 -73
- package/dist/recipe.js.map +1 -1
- package/dist/rpc/index.js +74 -115
- package/dist/rpc/index.js.map +1 -1
- package/dist/rpc/queue.js +71 -90
- package/dist/rpc/queue.js.map +1 -1
- package/dist/rpc/recipe.js +32 -57
- package/dist/rpc/recipe.js.map +1 -1
- package/dist/rpc/request/generate.js +4 -13
- package/dist/rpc/request/generate.js.map +1 -1
- package/dist/rpc/request/get-languages.js +2 -11
- package/dist/rpc/request/get-languages.js.map +1 -1
- package/dist/rpc/request/get-marketplace.js +9 -20
- package/dist/rpc/request/get-marketplace.js.map +1 -1
- package/dist/rpc/request/get-object.js +4 -13
- package/dist/rpc/request/get-object.js.map +1 -1
- package/dist/rpc/request/install-recipes.js +25 -36
- package/dist/rpc/request/install-recipes.js.map +1 -1
- package/dist/rpc/request/metrics.js +8 -17
- package/dist/rpc/request/metrics.js.map +1 -1
- package/dist/rpc/request/parse-project.js +36 -45
- package/dist/rpc/request/parse-project.js.map +1 -1
- package/dist/rpc/request/parse.js +5 -14
- package/dist/rpc/request/parse.js.map +1 -1
- package/dist/rpc/request/prepare-recipe.js +37 -52
- package/dist/rpc/request/prepare-recipe.js.map +1 -1
- package/dist/rpc/request/print.js +5 -14
- package/dist/rpc/request/print.js.map +1 -1
- package/dist/rpc/request/visit.js +56 -71
- package/dist/rpc/request/visit.js.map +1 -1
- package/dist/rpc/rewrite-rpc.js +70 -97
- package/dist/rpc/rewrite-rpc.js.map +1 -1
- package/dist/rpc/server.js +76 -89
- package/dist/rpc/server.js.map +1 -1
- package/dist/run.js +47 -66
- package/dist/run.js.map +1 -1
- package/dist/search/is-source-file.js +8 -19
- package/dist/search/is-source-file.js.map +1 -1
- package/dist/test/rewrite-test.js +154 -188
- package/dist/test/rewrite-test.js.map +1 -1
- package/dist/text/print.js +23 -38
- package/dist/text/print.js.map +1 -1
- package/dist/text/rpc.js +29 -44
- package/dist/text/rpc.js.map +1 -1
- package/dist/text/visitor.js +16 -33
- package/dist/text/visitor.js.map +1 -1
- package/dist/util.js +13 -24
- package/dist/util.js.map +1 -1
- package/dist/version.txt +1 -1
- package/dist/visitor.js +84 -115
- package/dist/visitor.js.map +1 -1
- package/dist/yaml/index.d.ts +2 -0
- package/dist/yaml/index.d.ts.map +1 -1
- package/dist/yaml/index.js +2 -0
- package/dist/yaml/index.js.map +1 -1
- package/dist/yaml/markers.d.ts +21 -0
- package/dist/yaml/markers.d.ts.map +1 -0
- package/dist/yaml/markers.js +37 -0
- package/dist/yaml/markers.js.map +1 -0
- package/dist/yaml/parser.d.ts.map +1 -1
- package/dist/yaml/parser.js +4 -1
- package/dist/yaml/parser.js.map +1 -1
- package/dist/yaml/print.d.ts +1 -1
- package/dist/yaml/print.d.ts.map +1 -1
- package/dist/yaml/print.js +175 -208
- package/dist/yaml/print.js.map +1 -1
- package/dist/yaml/rpc.js +154 -219
- package/dist/yaml/rpc.js.map +1 -1
- package/dist/yaml/visitor.js +78 -113
- package/dist/yaml/visitor.js.map +1 -1
- package/package.json +1 -1
- package/src/javascript/parser.ts +56 -14
- package/src/yaml/index.ts +2 -0
- package/src/yaml/markers.ts +70 -0
- package/src/yaml/parser.ts +5 -1
- package/src/yaml/print.ts +5 -2
package/dist/javascript/rpc.js
CHANGED
|
@@ -1,13 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
3
|
/*
|
|
13
4
|
* Copyright 2025 the original author or authors.
|
|
@@ -34,587 +25,434 @@ class JavaScriptSender extends visitor_1.JavaScriptVisitor {
|
|
|
34
25
|
super();
|
|
35
26
|
this.delegate = new JavaScriptDelegateSender(this);
|
|
36
27
|
}
|
|
37
|
-
visit(tree, p, parent) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
return
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
return
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
return
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
return
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
return
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
return
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
return
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
return
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
}
|
|
454
|
-
|
|
455
|
-
return
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
});
|
|
466
|
-
}
|
|
467
|
-
visitJsxAttribute(attribute, q) {
|
|
468
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
469
|
-
yield q.getAndSend(attribute, el => el.key, el => this.visit(el, q));
|
|
470
|
-
yield q.getAndSend(attribute, el => el.value, el => this.visitLeftPadded(el, q));
|
|
471
|
-
return attribute;
|
|
472
|
-
});
|
|
473
|
-
}
|
|
474
|
-
visitJsxSpreadAttribute(spreadAttribute, q) {
|
|
475
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
476
|
-
yield q.getAndSend(spreadAttribute, el => el.dots, space => this.visitSpace(space, q));
|
|
477
|
-
yield q.getAndSend(spreadAttribute, el => el.expression, el => this.visitRightPadded(el, q));
|
|
478
|
-
return spreadAttribute;
|
|
479
|
-
});
|
|
480
|
-
}
|
|
481
|
-
visitJsxEmbeddedExpression(embeddedExpression, q) {
|
|
482
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
483
|
-
yield q.getAndSend(embeddedExpression, el => el.expression, el => this.visitRightPadded(el, q));
|
|
484
|
-
return embeddedExpression;
|
|
485
|
-
});
|
|
486
|
-
}
|
|
487
|
-
visitJsxNamespacedName(namespacedName, q) {
|
|
488
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
489
|
-
yield q.getAndSend(namespacedName, el => el.namespace, el => this.visit(el, q));
|
|
490
|
-
yield q.getAndSend(namespacedName, el => el.name, el => this.visitLeftPadded(el, q));
|
|
491
|
-
return namespacedName;
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
visitIndexSignatureDeclaration(indexSignatureDeclaration, q) {
|
|
495
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
496
|
-
yield q.getAndSendList(indexSignatureDeclaration, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
497
|
-
yield q.getAndSend(indexSignatureDeclaration, el => el.parameters, el => this.visitContainer(el, q));
|
|
498
|
-
yield q.getAndSend(indexSignatureDeclaration, el => el.typeExpression, el => this.visitLeftPadded(el, q));
|
|
499
|
-
yield q.getAndSend(indexSignatureDeclaration, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
500
|
-
return indexSignatureDeclaration;
|
|
501
|
-
});
|
|
502
|
-
}
|
|
503
|
-
visitComputedPropertyMethodDeclaration(computedPropMethod, q) {
|
|
504
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
505
|
-
yield q.getAndSendList(computedPropMethod, el => el.leadingAnnotations, el => el.id, el => this.visit(el, q));
|
|
506
|
-
yield q.getAndSendList(computedPropMethod, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
507
|
-
yield q.getAndSend(computedPropMethod, el => el.typeParameters, el => this.visit(el, q));
|
|
508
|
-
yield q.getAndSend(computedPropMethod, el => el.returnTypeExpression, el => this.visit(el, q));
|
|
509
|
-
yield q.getAndSend(computedPropMethod, el => el.name, el => this.visit(el, q));
|
|
510
|
-
yield q.getAndSend(computedPropMethod, el => el.parameters, el => this.visitContainer(el, q));
|
|
511
|
-
yield q.getAndSend(computedPropMethod, el => el.body, el => this.visit(el, q));
|
|
512
|
-
yield q.getAndSend(computedPropMethod, el => el.methodType, el => this.visitType(el, q));
|
|
513
|
-
return computedPropMethod;
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
visitForOfLoop(forOfLoop, q) {
|
|
517
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
518
|
-
yield q.getAndSend(forOfLoop, el => el.await, space => this.visitSpace(space, q));
|
|
519
|
-
yield q.getAndSend(forOfLoop, el => el.loop, el => this.visit(el, q));
|
|
520
|
-
return forOfLoop;
|
|
521
|
-
});
|
|
522
|
-
}
|
|
523
|
-
visitForInLoop(forInLoop, q) {
|
|
524
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
525
|
-
yield q.getAndSend(forInLoop, el => el.control, el => this.visit(el, q));
|
|
526
|
-
yield q.getAndSend(forInLoop, el => el.body, el => this.visitRightPadded(el, q));
|
|
527
|
-
return forInLoop;
|
|
528
|
-
});
|
|
529
|
-
}
|
|
530
|
-
visitNamespaceDeclaration(namespaceDeclaration, q) {
|
|
531
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
532
|
-
yield q.getAndSendList(namespaceDeclaration, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
533
|
-
yield q.getAndSend(namespaceDeclaration, el => el.keywordType, el => this.visitLeftPadded(el, q));
|
|
534
|
-
yield q.getAndSend(namespaceDeclaration, el => el.name, el => this.visitRightPadded(el, q));
|
|
535
|
-
yield q.getAndSend(namespaceDeclaration, el => el.body, el => this.visit(el, q));
|
|
536
|
-
return namespaceDeclaration;
|
|
537
|
-
});
|
|
538
|
-
}
|
|
539
|
-
visitTypeLiteral(typeLiteral, q) {
|
|
540
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
541
|
-
yield q.getAndSend(typeLiteral, el => el.members, el => this.visit(el, q));
|
|
542
|
-
yield q.getAndSend(typeLiteral, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
543
|
-
return typeLiteral;
|
|
544
|
-
});
|
|
545
|
-
}
|
|
546
|
-
visitArrayBindingPattern(arrayBindingPattern, q) {
|
|
547
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
548
|
-
yield q.getAndSend(arrayBindingPattern, el => el.elements, el => this.visitContainer(el, q));
|
|
549
|
-
yield q.getAndSend(arrayBindingPattern, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
550
|
-
return arrayBindingPattern;
|
|
551
|
-
});
|
|
552
|
-
}
|
|
553
|
-
visitBindingElement(bindingElement, q) {
|
|
554
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
555
|
-
yield q.getAndSend(bindingElement, el => el.propertyName, el => this.visitRightPadded(el, q));
|
|
556
|
-
yield q.getAndSend(bindingElement, el => el.name, el => this.visit(el, q));
|
|
557
|
-
yield q.getAndSend(bindingElement, el => el.initializer, el => this.visitLeftPadded(el, q));
|
|
558
|
-
yield q.getAndSend(bindingElement, el => el.variableType, el => this.visitType(el, q));
|
|
559
|
-
return bindingElement;
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
visitExportDeclaration(exportDeclaration, q) {
|
|
563
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
564
|
-
yield q.getAndSendList(exportDeclaration, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
565
|
-
yield q.getAndSend(exportDeclaration, el => el.typeOnly, el => this.visitLeftPadded(el, q));
|
|
566
|
-
yield q.getAndSend(exportDeclaration, el => el.exportClause, el => this.visit(el, q));
|
|
567
|
-
yield q.getAndSend(exportDeclaration, el => el.moduleSpecifier, el => this.visitLeftPadded(el, q));
|
|
568
|
-
yield q.getAndSend(exportDeclaration, el => el.attributes, el => this.visit(el, q));
|
|
569
|
-
return exportDeclaration;
|
|
570
|
-
});
|
|
571
|
-
}
|
|
572
|
-
visitExportAssignment(exportAssignment, q) {
|
|
573
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
574
|
-
yield q.getAndSend(exportAssignment, el => el.exportEquals);
|
|
575
|
-
yield q.getAndSend(exportAssignment, el => el.expression, el => this.visitLeftPadded(el, q));
|
|
576
|
-
return exportAssignment;
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
|
-
visitNamedExports(namedExports, q) {
|
|
580
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
581
|
-
yield q.getAndSend(namedExports, el => el.elements, el => this.visitContainer(el, q));
|
|
582
|
-
yield q.getAndSend(namedExports, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
583
|
-
return namedExports;
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
visitExportSpecifier(exportSpecifier, q) {
|
|
587
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
588
|
-
yield q.getAndSend(exportSpecifier, el => el.typeOnly, el => this.visitLeftPadded(el, q));
|
|
589
|
-
yield q.getAndSend(exportSpecifier, el => el.specifier, el => this.visit(el, q));
|
|
590
|
-
yield q.getAndSend(exportSpecifier, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
591
|
-
return exportSpecifier;
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
visitRightPadded(right, q) {
|
|
595
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
596
|
-
return this.delegate.visitRightPadded(right, q);
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
|
-
visitLeftPadded(left, q) {
|
|
600
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
601
|
-
return this.delegate.visitLeftPadded(left, q);
|
|
602
|
-
});
|
|
603
|
-
}
|
|
604
|
-
visitContainer(container, q) {
|
|
605
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
606
|
-
return this.delegate.visitContainer(container, q);
|
|
607
|
-
});
|
|
608
|
-
}
|
|
609
|
-
visitSpace(space, q) {
|
|
610
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
611
|
-
return this.delegate.visitSpace(space, q);
|
|
612
|
-
});
|
|
613
|
-
}
|
|
614
|
-
visitType(javaType, q) {
|
|
615
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
616
|
-
return this.delegate.visitType(javaType, q);
|
|
617
|
-
});
|
|
28
|
+
async visit(tree, p, parent) {
|
|
29
|
+
if ((0, tree_1.isJavaScript)(tree)) {
|
|
30
|
+
return super.visit(tree, p, parent);
|
|
31
|
+
}
|
|
32
|
+
return this.delegate.visit(tree, p, parent);
|
|
33
|
+
}
|
|
34
|
+
async preVisit(j, q) {
|
|
35
|
+
await q.getAndSend(j, j2 => j2.id);
|
|
36
|
+
await q.getAndSend(j, j2 => j2.prefix, space => this.visitSpace(space, q));
|
|
37
|
+
await q.getAndSend(j, j2 => j2.markers);
|
|
38
|
+
return j;
|
|
39
|
+
}
|
|
40
|
+
async visitJsCompilationUnit(cu, q) {
|
|
41
|
+
await q.getAndSend(cu, c => c.sourcePath);
|
|
42
|
+
await q.getAndSend(cu, c => c.charsetName);
|
|
43
|
+
await q.getAndSend(cu, c => c.charsetBomMarked);
|
|
44
|
+
await q.getAndSend(cu, c => c.checksum);
|
|
45
|
+
await q.getAndSend(cu, c => c.fileAttributes);
|
|
46
|
+
await q.getAndSendList(cu, c => c.statements, stmt => stmt.element.id, stmt => this.visitRightPadded(stmt, q));
|
|
47
|
+
await q.getAndSend(cu, c => c.eof, space => this.visitSpace(space, q));
|
|
48
|
+
return cu;
|
|
49
|
+
}
|
|
50
|
+
async visitAlias(alias, q) {
|
|
51
|
+
await q.getAndSend(alias, el => el.propertyName, el => this.visitRightPadded(el, q));
|
|
52
|
+
await q.getAndSend(alias, el => el.alias, el => this.visit(el, q));
|
|
53
|
+
return alias;
|
|
54
|
+
}
|
|
55
|
+
async visitArrowFunction(arrowFunction, q) {
|
|
56
|
+
await q.getAndSendList(arrowFunction, el => el.leadingAnnotations, el => el.id, el => this.visit(el, q));
|
|
57
|
+
await q.getAndSendList(arrowFunction, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
58
|
+
await q.getAndSend(arrowFunction, el => el.typeParameters, el => this.visit(el, q));
|
|
59
|
+
await q.getAndSend(arrowFunction, el => el.lambda, el => this.visit(el, q));
|
|
60
|
+
await q.getAndSend(arrowFunction, el => el.returnTypeExpression, el => this.visit(el, q));
|
|
61
|
+
return arrowFunction;
|
|
62
|
+
}
|
|
63
|
+
async visitAwait(await_, q) {
|
|
64
|
+
await q.getAndSend(await_, el => el.expression, el => this.visit(el, q));
|
|
65
|
+
await q.getAndSend(await_, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
66
|
+
return await_;
|
|
67
|
+
}
|
|
68
|
+
async visitConditionalType(conditionalType, q) {
|
|
69
|
+
await q.getAndSend(conditionalType, el => el.checkType, el => this.visit(el, q));
|
|
70
|
+
await q.getAndSend(conditionalType, el => el.condition, el => this.visitLeftPadded(el, q));
|
|
71
|
+
await q.getAndSend(conditionalType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
72
|
+
return conditionalType;
|
|
73
|
+
}
|
|
74
|
+
async visitDelete(delete_, q) {
|
|
75
|
+
await q.getAndSend(delete_, el => el.expression, el => this.visit(el, q));
|
|
76
|
+
return delete_;
|
|
77
|
+
}
|
|
78
|
+
async visitExpressionStatement(expressionStatement, q) {
|
|
79
|
+
await q.getAndSend(expressionStatement, el => el.expression, el => this.visit(el, q));
|
|
80
|
+
return expressionStatement;
|
|
81
|
+
}
|
|
82
|
+
async visitExpressionWithTypeArguments(expressionWithTypeArguments, q) {
|
|
83
|
+
await q.getAndSend(expressionWithTypeArguments, el => el.clazz, el => this.visit(el, q));
|
|
84
|
+
await q.getAndSend(expressionWithTypeArguments, el => el.typeArguments, el => this.visitContainer(el, q));
|
|
85
|
+
await q.getAndSend(expressionWithTypeArguments, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
86
|
+
return expressionWithTypeArguments;
|
|
87
|
+
}
|
|
88
|
+
async visitFunctionCall(functionCall, q) {
|
|
89
|
+
await q.getAndSend(functionCall, m => m.function, f => this.visitRightPadded(f, q));
|
|
90
|
+
await q.getAndSend(functionCall, m => m.typeParameters, params => this.visitContainer(params, q));
|
|
91
|
+
await q.getAndSend(functionCall, m => m.arguments, args => this.visitContainer(args, q));
|
|
92
|
+
await q.getAndSend(functionCall, m => (0, rpc_1.asRef)(m.methodType), type => this.visitType(type, q));
|
|
93
|
+
return functionCall;
|
|
94
|
+
}
|
|
95
|
+
async visitFunctionType(functionType, q) {
|
|
96
|
+
await q.getAndSendList(functionType, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
97
|
+
await q.getAndSend(functionType, el => el.constructorType, el => this.visitLeftPadded(el, q));
|
|
98
|
+
await q.getAndSend(functionType, el => el.typeParameters, el => this.visit(el, q));
|
|
99
|
+
await q.getAndSend(functionType, el => el.parameters, el => this.visitContainer(el, q));
|
|
100
|
+
await q.getAndSend(functionType, el => el.returnType, el => this.visitLeftPadded(el, q));
|
|
101
|
+
return functionType;
|
|
102
|
+
}
|
|
103
|
+
async visitInferType(inferType, q) {
|
|
104
|
+
await q.getAndSend(inferType, el => el.typeParameter, el => this.visitLeftPadded(el, q));
|
|
105
|
+
await q.getAndSend(inferType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
106
|
+
return inferType;
|
|
107
|
+
}
|
|
108
|
+
async visitImportType(importType, q) {
|
|
109
|
+
await q.getAndSend(importType, el => el.hasTypeof, el => this.visitRightPadded(el, q));
|
|
110
|
+
await q.getAndSend(importType, el => el.argumentAndAttributes, el => this.visitContainer(el, q));
|
|
111
|
+
await q.getAndSend(importType, el => el.qualifier, el => this.visitLeftPadded(el, q));
|
|
112
|
+
await q.getAndSend(importType, el => el.typeArguments, el => this.visitContainer(el, q));
|
|
113
|
+
await q.getAndSend(importType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
114
|
+
return importType;
|
|
115
|
+
}
|
|
116
|
+
async visitImportDeclaration(jsImport, q) {
|
|
117
|
+
await q.getAndSendList(jsImport, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
118
|
+
await q.getAndSend(jsImport, el => el.importClause, el => this.visit(el, q));
|
|
119
|
+
await q.getAndSend(jsImport, el => el.moduleSpecifier, el => this.visitLeftPadded(el, q));
|
|
120
|
+
await q.getAndSend(jsImport, el => el.attributes, el => this.visit(el, q));
|
|
121
|
+
await q.getAndSend(jsImport, el => el.initializer, el => this.visitLeftPadded(el, q));
|
|
122
|
+
return jsImport;
|
|
123
|
+
}
|
|
124
|
+
async visitImportClause(jsImportClause, q) {
|
|
125
|
+
await q.getAndSend(jsImportClause, el => el.typeOnly);
|
|
126
|
+
await q.getAndSend(jsImportClause, el => el.name, el => this.visitRightPadded(el, q));
|
|
127
|
+
await q.getAndSend(jsImportClause, el => el.namedBindings, el => this.visit(el, q));
|
|
128
|
+
return jsImportClause;
|
|
129
|
+
}
|
|
130
|
+
async visitNamedImports(namedImports, q) {
|
|
131
|
+
await q.getAndSend(namedImports, el => el.elements, el => this.visitContainer(el, q));
|
|
132
|
+
await q.getAndSend(namedImports, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
133
|
+
return namedImports;
|
|
134
|
+
}
|
|
135
|
+
async visitImportSpecifier(jsImportSpecifier, q) {
|
|
136
|
+
await q.getAndSend(jsImportSpecifier, el => el.importType, el => this.visitLeftPadded(el, q));
|
|
137
|
+
await q.getAndSend(jsImportSpecifier, el => el.specifier, el => this.visit(el, q));
|
|
138
|
+
await q.getAndSend(jsImportSpecifier, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
139
|
+
return jsImportSpecifier;
|
|
140
|
+
}
|
|
141
|
+
async visitImportAttributes(importAttributes, q) {
|
|
142
|
+
await q.getAndSend(importAttributes, el => el.token);
|
|
143
|
+
await q.getAndSend(importAttributes, el => el.elements, el => this.visitContainer(el, q));
|
|
144
|
+
return importAttributes;
|
|
145
|
+
}
|
|
146
|
+
async visitImportTypeAttributes(importTypeAttributes, q) {
|
|
147
|
+
await q.getAndSend(importTypeAttributes, el => el.token, el => this.visitRightPadded(el, q));
|
|
148
|
+
await q.getAndSend(importTypeAttributes, el => el.elements, el => this.visitContainer(el, q));
|
|
149
|
+
await q.getAndSend(importTypeAttributes, el => el.end, el => this.visitSpace(el, q));
|
|
150
|
+
return importTypeAttributes;
|
|
151
|
+
}
|
|
152
|
+
async visitImportAttribute(importAttribute, q) {
|
|
153
|
+
await q.getAndSend(importAttribute, el => el.name, el => this.visit(el, q));
|
|
154
|
+
await q.getAndSend(importAttribute, el => el.value, el => this.visitLeftPadded(el, q));
|
|
155
|
+
return importAttribute;
|
|
156
|
+
}
|
|
157
|
+
async visitBinaryExtensions(binary, q) {
|
|
158
|
+
await q.getAndSend(binary, el => el.left, el => this.visit(el, q));
|
|
159
|
+
await q.getAndSend(binary, el => el.operator, el => this.visitLeftPadded(el, q));
|
|
160
|
+
await q.getAndSend(binary, el => el.right, el => this.visit(el, q));
|
|
161
|
+
await q.getAndSend(binary, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
162
|
+
return binary;
|
|
163
|
+
}
|
|
164
|
+
async visitLiteralType(literalType, q) {
|
|
165
|
+
await q.getAndSend(literalType, el => el.literal, el => this.visit(el, q));
|
|
166
|
+
await q.getAndSend(literalType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
167
|
+
return literalType;
|
|
168
|
+
}
|
|
169
|
+
async visitMappedType(mappedType, q) {
|
|
170
|
+
await q.getAndSend(mappedType, el => el.prefixToken, el => this.visitLeftPadded(el, q));
|
|
171
|
+
await q.getAndSend(mappedType, el => el.hasReadonly, el => this.visitLeftPadded(el, q));
|
|
172
|
+
await q.getAndSend(mappedType, el => el.keysRemapping, el => this.visit(el, q));
|
|
173
|
+
await q.getAndSend(mappedType, el => el.suffixToken, el => this.visitLeftPadded(el, q));
|
|
174
|
+
await q.getAndSend(mappedType, el => el.hasQuestionToken, el => this.visitLeftPadded(el, q));
|
|
175
|
+
await q.getAndSend(mappedType, el => el.valueType, el => this.visitContainer(el, q));
|
|
176
|
+
await q.getAndSend(mappedType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
177
|
+
return mappedType;
|
|
178
|
+
}
|
|
179
|
+
async visitMappedTypeKeysRemapping(keysRemapping, q) {
|
|
180
|
+
await q.getAndSend(keysRemapping, el => el.typeParameter, el => this.visitRightPadded(el, q));
|
|
181
|
+
await q.getAndSend(keysRemapping, el => el.nameType, el => this.visitRightPadded(el, q));
|
|
182
|
+
return keysRemapping;
|
|
183
|
+
}
|
|
184
|
+
async visitMappedTypeParameter(mappedTypeParameter, q) {
|
|
185
|
+
await q.getAndSend(mappedTypeParameter, el => el.name, el => this.visit(el, q));
|
|
186
|
+
await q.getAndSend(mappedTypeParameter, el => el.iterateType, el => this.visitLeftPadded(el, q));
|
|
187
|
+
return mappedTypeParameter;
|
|
188
|
+
}
|
|
189
|
+
async visitObjectBindingPattern(objectBindingPattern, q) {
|
|
190
|
+
await q.getAndSendList(objectBindingPattern, el => el.leadingAnnotations, el => el.id, el => this.visit(el, q));
|
|
191
|
+
await q.getAndSendList(objectBindingPattern, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
192
|
+
await q.getAndSend(objectBindingPattern, el => el.typeExpression, el => this.visit(el, q));
|
|
193
|
+
await q.getAndSend(objectBindingPattern, el => el.bindings, el => this.visitContainer(el, q));
|
|
194
|
+
await q.getAndSend(objectBindingPattern, el => el.initializer, el => this.visitLeftPadded(el, q));
|
|
195
|
+
return objectBindingPattern;
|
|
196
|
+
}
|
|
197
|
+
async visitPropertyAssignment(propertyAssignment, q) {
|
|
198
|
+
await q.getAndSend(propertyAssignment, el => el.name, el => this.visitRightPadded(el, q));
|
|
199
|
+
await q.getAndSend(propertyAssignment, el => el.assigmentToken);
|
|
200
|
+
await q.getAndSend(propertyAssignment, el => el.initializer, el => this.visit(el, q));
|
|
201
|
+
return propertyAssignment;
|
|
202
|
+
}
|
|
203
|
+
async visitSatisfiesExpression(satisfiesExpression, q) {
|
|
204
|
+
await q.getAndSend(satisfiesExpression, el => el.expression, el => this.visit(el, q));
|
|
205
|
+
await q.getAndSend(satisfiesExpression, el => el.satisfiesType, el => this.visitLeftPadded(el, q));
|
|
206
|
+
await q.getAndSend(satisfiesExpression, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
207
|
+
return satisfiesExpression;
|
|
208
|
+
}
|
|
209
|
+
async visitScopedVariableDeclarations(scopedVariableDeclarations, q) {
|
|
210
|
+
await q.getAndSendList(scopedVariableDeclarations, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
211
|
+
await q.getAndSendList(scopedVariableDeclarations, el => el.variables, el => el.element.id, el => this.visitRightPadded(el, q));
|
|
212
|
+
return scopedVariableDeclarations;
|
|
213
|
+
}
|
|
214
|
+
async visitShebang(shebang, q) {
|
|
215
|
+
await q.getAndSend(shebang, el => el.text);
|
|
216
|
+
return shebang;
|
|
217
|
+
}
|
|
218
|
+
async visitSpread(spread, q) {
|
|
219
|
+
await q.getAndSend(spread, el => el.expression, el => this.visit(el, q));
|
|
220
|
+
await q.getAndSend(spread, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
221
|
+
return spread;
|
|
222
|
+
}
|
|
223
|
+
async visitStatementExpression(statementExpression, q) {
|
|
224
|
+
await q.getAndSend(statementExpression, el => el.statement, el => this.visit(el, q));
|
|
225
|
+
return statementExpression;
|
|
226
|
+
}
|
|
227
|
+
async visitTaggedTemplateExpression(taggedTemplateExpression, q) {
|
|
228
|
+
await q.getAndSend(taggedTemplateExpression, el => el.tag, el => this.visitRightPadded(el, q));
|
|
229
|
+
await q.getAndSend(taggedTemplateExpression, el => el.typeArguments, el => this.visitContainer(el, q));
|
|
230
|
+
await q.getAndSend(taggedTemplateExpression, el => el.templateExpression, el => this.visit(el, q));
|
|
231
|
+
await q.getAndSend(taggedTemplateExpression, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
232
|
+
return taggedTemplateExpression;
|
|
233
|
+
}
|
|
234
|
+
async visitTemplateExpression(templateExpression, q) {
|
|
235
|
+
await q.getAndSend(templateExpression, el => el.head, el => this.visit(el, q));
|
|
236
|
+
await q.getAndSendList(templateExpression, el => el.spans, el => el.element.id, el => this.visitRightPadded(el, q));
|
|
237
|
+
await q.getAndSend(templateExpression, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
238
|
+
return templateExpression;
|
|
239
|
+
}
|
|
240
|
+
async visitTemplateExpressionSpan(span, q) {
|
|
241
|
+
await q.getAndSend(span, el => el.expression, el => this.visit(el, q));
|
|
242
|
+
await q.getAndSend(span, el => el.tail, el => this.visit(el, q));
|
|
243
|
+
return span;
|
|
244
|
+
}
|
|
245
|
+
async visitTuple(tuple, q) {
|
|
246
|
+
await q.getAndSend(tuple, el => el.elements, el => this.visitContainer(el, q));
|
|
247
|
+
await q.getAndSend(tuple, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
248
|
+
return tuple;
|
|
249
|
+
}
|
|
250
|
+
async visitTypeDeclaration(typeDeclaration, q) {
|
|
251
|
+
await q.getAndSendList(typeDeclaration, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
252
|
+
await q.getAndSend(typeDeclaration, el => el.name, el => this.visitLeftPadded(el, q));
|
|
253
|
+
await q.getAndSend(typeDeclaration, el => el.typeParameters, el => this.visit(el, q));
|
|
254
|
+
await q.getAndSend(typeDeclaration, el => el.initializer, el => this.visitLeftPadded(el, q));
|
|
255
|
+
await q.getAndSend(typeDeclaration, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
256
|
+
return typeDeclaration;
|
|
257
|
+
}
|
|
258
|
+
async visitTypeOf(typeOf, q) {
|
|
259
|
+
await q.getAndSend(typeOf, el => el.expression, el => this.visit(el, q));
|
|
260
|
+
await q.getAndSend(typeOf, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
261
|
+
return typeOf;
|
|
262
|
+
}
|
|
263
|
+
async visitTypeTreeExpression(typeTreeExpression, q) {
|
|
264
|
+
await q.getAndSend(typeTreeExpression, el => el.expression, el => this.visit(el, q));
|
|
265
|
+
return typeTreeExpression;
|
|
266
|
+
}
|
|
267
|
+
async visitAs(as_, q) {
|
|
268
|
+
await q.getAndSend(as_, el => el.left, el => this.visitRightPadded(el, q));
|
|
269
|
+
await q.getAndSend(as_, el => el.right, el => this.visit(el, q));
|
|
270
|
+
await q.getAndSend(as_, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
271
|
+
return as_;
|
|
272
|
+
}
|
|
273
|
+
async visitAssignmentOperationExtensions(assignmentOperation, q) {
|
|
274
|
+
await q.getAndSend(assignmentOperation, el => el.variable, el => this.visit(el, q));
|
|
275
|
+
await q.getAndSend(assignmentOperation, el => el.operator, el => this.visitLeftPadded(el, q));
|
|
276
|
+
await q.getAndSend(assignmentOperation, el => el.assignment, el => this.visit(el, q));
|
|
277
|
+
await q.getAndSend(assignmentOperation, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
278
|
+
return assignmentOperation;
|
|
279
|
+
}
|
|
280
|
+
async visitIndexedAccessType(indexedAccessType, q) {
|
|
281
|
+
await q.getAndSend(indexedAccessType, el => el.objectType, el => this.visit(el, q));
|
|
282
|
+
await q.getAndSend(indexedAccessType, el => el.indexType, el => this.visit(el, q));
|
|
283
|
+
await q.getAndSend(indexedAccessType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
284
|
+
return indexedAccessType;
|
|
285
|
+
}
|
|
286
|
+
async visitIndexedAccessTypeIndexType(indexType, q) {
|
|
287
|
+
await q.getAndSend(indexType, el => el.element, el => this.visitRightPadded(el, q));
|
|
288
|
+
await q.getAndSend(indexType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
289
|
+
return indexType;
|
|
290
|
+
}
|
|
291
|
+
async visitTypeQuery(typeQuery, q) {
|
|
292
|
+
await q.getAndSend(typeQuery, el => el.typeExpression, el => this.visit(el, q));
|
|
293
|
+
await q.getAndSend(typeQuery, el => el.typeArguments, el => this.visitContainer(el, q));
|
|
294
|
+
await q.getAndSend(typeQuery, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
295
|
+
return typeQuery;
|
|
296
|
+
}
|
|
297
|
+
async visitTypeInfo(typeInfo, q) {
|
|
298
|
+
await q.getAndSend(typeInfo, el => el.typeIdentifier, el => this.visit(el, q));
|
|
299
|
+
return typeInfo;
|
|
300
|
+
}
|
|
301
|
+
async visitComputedPropertyName(computedPropertyName, q) {
|
|
302
|
+
await q.getAndSend(computedPropertyName, el => el.expression, el => this.visitRightPadded(el, q));
|
|
303
|
+
return computedPropertyName;
|
|
304
|
+
}
|
|
305
|
+
async visitTypeOperator(typeOperator, q) {
|
|
306
|
+
await q.getAndSend(typeOperator, el => el.operator);
|
|
307
|
+
await q.getAndSend(typeOperator, el => el.expression, el => this.visitLeftPadded(el, q));
|
|
308
|
+
return typeOperator;
|
|
309
|
+
}
|
|
310
|
+
async visitTypePredicate(typePredicate, q) {
|
|
311
|
+
await q.getAndSend(typePredicate, el => el.asserts, el => this.visitLeftPadded(el, q));
|
|
312
|
+
await q.getAndSend(typePredicate, el => el.parameterName, el => this.visit(el, q));
|
|
313
|
+
await q.getAndSend(typePredicate, el => el.expression, el => this.visitLeftPadded(el, q));
|
|
314
|
+
await q.getAndSend(typePredicate, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
315
|
+
return typePredicate;
|
|
316
|
+
}
|
|
317
|
+
async visitUnion(union, q) {
|
|
318
|
+
await q.getAndSendList(union, el => el.types, el => el.element.id, el => this.visitRightPadded(el, q));
|
|
319
|
+
await q.getAndSend(union, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
320
|
+
return union;
|
|
321
|
+
}
|
|
322
|
+
async visitIntersection(intersection, q) {
|
|
323
|
+
await q.getAndSendList(intersection, el => el.types, el => el.element.id, el => this.visitRightPadded(el, q));
|
|
324
|
+
await q.getAndSend(intersection, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
325
|
+
return intersection;
|
|
326
|
+
}
|
|
327
|
+
async visitVoid(void_, q) {
|
|
328
|
+
await q.getAndSend(void_, el => el.expression, el => this.visit(el, q));
|
|
329
|
+
return void_;
|
|
330
|
+
}
|
|
331
|
+
async visitWithStatement(withStatement, q) {
|
|
332
|
+
await q.getAndSend(withStatement, el => el.expression, el => this.visit(el, q));
|
|
333
|
+
await q.getAndSend(withStatement, el => el.body, el => this.visitRightPadded(el, q));
|
|
334
|
+
return withStatement;
|
|
335
|
+
}
|
|
336
|
+
async visitJsxTag(tag, q) {
|
|
337
|
+
await q.getAndSend(tag, el => el.openName, el => this.visitLeftPadded(el, q));
|
|
338
|
+
await q.getAndSend(tag, el => el.typeArguments, el => this.visitContainer(el, q));
|
|
339
|
+
await q.getAndSend(tag, el => el.afterName, space => this.visitSpace(space, q));
|
|
340
|
+
await q.getAndSendList(tag, el => el.attributes, attr => attr.element.id, attr => this.visitRightPadded(attr, q));
|
|
341
|
+
await q.getAndSend(tag, el => el.selfClosing, space => this.visitSpace(space, q));
|
|
342
|
+
await q.getAndSendList(tag, el => el.children, child => child.id, child => this.visit(child, q));
|
|
343
|
+
await q.getAndSend(tag, el => el.closingName, el => this.visitLeftPadded(el, q));
|
|
344
|
+
await q.getAndSend(tag, el => el.afterClosingName, el => this.visitSpace(el, q));
|
|
345
|
+
return tag;
|
|
346
|
+
}
|
|
347
|
+
async visitJsxAttribute(attribute, q) {
|
|
348
|
+
await q.getAndSend(attribute, el => el.key, el => this.visit(el, q));
|
|
349
|
+
await q.getAndSend(attribute, el => el.value, el => this.visitLeftPadded(el, q));
|
|
350
|
+
return attribute;
|
|
351
|
+
}
|
|
352
|
+
async visitJsxSpreadAttribute(spreadAttribute, q) {
|
|
353
|
+
await q.getAndSend(spreadAttribute, el => el.dots, space => this.visitSpace(space, q));
|
|
354
|
+
await q.getAndSend(spreadAttribute, el => el.expression, el => this.visitRightPadded(el, q));
|
|
355
|
+
return spreadAttribute;
|
|
356
|
+
}
|
|
357
|
+
async visitJsxEmbeddedExpression(embeddedExpression, q) {
|
|
358
|
+
await q.getAndSend(embeddedExpression, el => el.expression, el => this.visitRightPadded(el, q));
|
|
359
|
+
return embeddedExpression;
|
|
360
|
+
}
|
|
361
|
+
async visitJsxNamespacedName(namespacedName, q) {
|
|
362
|
+
await q.getAndSend(namespacedName, el => el.namespace, el => this.visit(el, q));
|
|
363
|
+
await q.getAndSend(namespacedName, el => el.name, el => this.visitLeftPadded(el, q));
|
|
364
|
+
return namespacedName;
|
|
365
|
+
}
|
|
366
|
+
async visitIndexSignatureDeclaration(indexSignatureDeclaration, q) {
|
|
367
|
+
await q.getAndSendList(indexSignatureDeclaration, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
368
|
+
await q.getAndSend(indexSignatureDeclaration, el => el.parameters, el => this.visitContainer(el, q));
|
|
369
|
+
await q.getAndSend(indexSignatureDeclaration, el => el.typeExpression, el => this.visitLeftPadded(el, q));
|
|
370
|
+
await q.getAndSend(indexSignatureDeclaration, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
371
|
+
return indexSignatureDeclaration;
|
|
372
|
+
}
|
|
373
|
+
async visitComputedPropertyMethodDeclaration(computedPropMethod, q) {
|
|
374
|
+
await q.getAndSendList(computedPropMethod, el => el.leadingAnnotations, el => el.id, el => this.visit(el, q));
|
|
375
|
+
await q.getAndSendList(computedPropMethod, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
376
|
+
await q.getAndSend(computedPropMethod, el => el.typeParameters, el => this.visit(el, q));
|
|
377
|
+
await q.getAndSend(computedPropMethod, el => el.returnTypeExpression, el => this.visit(el, q));
|
|
378
|
+
await q.getAndSend(computedPropMethod, el => el.name, el => this.visit(el, q));
|
|
379
|
+
await q.getAndSend(computedPropMethod, el => el.parameters, el => this.visitContainer(el, q));
|
|
380
|
+
await q.getAndSend(computedPropMethod, el => el.body, el => this.visit(el, q));
|
|
381
|
+
await q.getAndSend(computedPropMethod, el => el.methodType, el => this.visitType(el, q));
|
|
382
|
+
return computedPropMethod;
|
|
383
|
+
}
|
|
384
|
+
async visitForOfLoop(forOfLoop, q) {
|
|
385
|
+
await q.getAndSend(forOfLoop, el => el.await, space => this.visitSpace(space, q));
|
|
386
|
+
await q.getAndSend(forOfLoop, el => el.loop, el => this.visit(el, q));
|
|
387
|
+
return forOfLoop;
|
|
388
|
+
}
|
|
389
|
+
async visitForInLoop(forInLoop, q) {
|
|
390
|
+
await q.getAndSend(forInLoop, el => el.control, el => this.visit(el, q));
|
|
391
|
+
await q.getAndSend(forInLoop, el => el.body, el => this.visitRightPadded(el, q));
|
|
392
|
+
return forInLoop;
|
|
393
|
+
}
|
|
394
|
+
async visitNamespaceDeclaration(namespaceDeclaration, q) {
|
|
395
|
+
await q.getAndSendList(namespaceDeclaration, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
396
|
+
await q.getAndSend(namespaceDeclaration, el => el.keywordType, el => this.visitLeftPadded(el, q));
|
|
397
|
+
await q.getAndSend(namespaceDeclaration, el => el.name, el => this.visitRightPadded(el, q));
|
|
398
|
+
await q.getAndSend(namespaceDeclaration, el => el.body, el => this.visit(el, q));
|
|
399
|
+
return namespaceDeclaration;
|
|
400
|
+
}
|
|
401
|
+
async visitTypeLiteral(typeLiteral, q) {
|
|
402
|
+
await q.getAndSend(typeLiteral, el => el.members, el => this.visit(el, q));
|
|
403
|
+
await q.getAndSend(typeLiteral, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
404
|
+
return typeLiteral;
|
|
405
|
+
}
|
|
406
|
+
async visitArrayBindingPattern(arrayBindingPattern, q) {
|
|
407
|
+
await q.getAndSend(arrayBindingPattern, el => el.elements, el => this.visitContainer(el, q));
|
|
408
|
+
await q.getAndSend(arrayBindingPattern, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
409
|
+
return arrayBindingPattern;
|
|
410
|
+
}
|
|
411
|
+
async visitBindingElement(bindingElement, q) {
|
|
412
|
+
await q.getAndSend(bindingElement, el => el.propertyName, el => this.visitRightPadded(el, q));
|
|
413
|
+
await q.getAndSend(bindingElement, el => el.name, el => this.visit(el, q));
|
|
414
|
+
await q.getAndSend(bindingElement, el => el.initializer, el => this.visitLeftPadded(el, q));
|
|
415
|
+
await q.getAndSend(bindingElement, el => el.variableType, el => this.visitType(el, q));
|
|
416
|
+
return bindingElement;
|
|
417
|
+
}
|
|
418
|
+
async visitExportDeclaration(exportDeclaration, q) {
|
|
419
|
+
await q.getAndSendList(exportDeclaration, el => el.modifiers, el => el.id, el => this.visit(el, q));
|
|
420
|
+
await q.getAndSend(exportDeclaration, el => el.typeOnly, el => this.visitLeftPadded(el, q));
|
|
421
|
+
await q.getAndSend(exportDeclaration, el => el.exportClause, el => this.visit(el, q));
|
|
422
|
+
await q.getAndSend(exportDeclaration, el => el.moduleSpecifier, el => this.visitLeftPadded(el, q));
|
|
423
|
+
await q.getAndSend(exportDeclaration, el => el.attributes, el => this.visit(el, q));
|
|
424
|
+
return exportDeclaration;
|
|
425
|
+
}
|
|
426
|
+
async visitExportAssignment(exportAssignment, q) {
|
|
427
|
+
await q.getAndSend(exportAssignment, el => el.exportEquals);
|
|
428
|
+
await q.getAndSend(exportAssignment, el => el.expression, el => this.visitLeftPadded(el, q));
|
|
429
|
+
return exportAssignment;
|
|
430
|
+
}
|
|
431
|
+
async visitNamedExports(namedExports, q) {
|
|
432
|
+
await q.getAndSend(namedExports, el => el.elements, el => this.visitContainer(el, q));
|
|
433
|
+
await q.getAndSend(namedExports, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
434
|
+
return namedExports;
|
|
435
|
+
}
|
|
436
|
+
async visitExportSpecifier(exportSpecifier, q) {
|
|
437
|
+
await q.getAndSend(exportSpecifier, el => el.typeOnly, el => this.visitLeftPadded(el, q));
|
|
438
|
+
await q.getAndSend(exportSpecifier, el => el.specifier, el => this.visit(el, q));
|
|
439
|
+
await q.getAndSend(exportSpecifier, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
|
|
440
|
+
return exportSpecifier;
|
|
441
|
+
}
|
|
442
|
+
async visitRightPadded(right, q) {
|
|
443
|
+
return this.delegate.visitRightPadded(right, q);
|
|
444
|
+
}
|
|
445
|
+
async visitLeftPadded(left, q) {
|
|
446
|
+
return this.delegate.visitLeftPadded(left, q);
|
|
447
|
+
}
|
|
448
|
+
async visitContainer(container, q) {
|
|
449
|
+
return this.delegate.visitContainer(container, q);
|
|
450
|
+
}
|
|
451
|
+
async visitSpace(space, q) {
|
|
452
|
+
return this.delegate.visitSpace(space, q);
|
|
453
|
+
}
|
|
454
|
+
async visitType(javaType, q) {
|
|
455
|
+
return this.delegate.visitType(javaType, q);
|
|
618
456
|
}
|
|
619
457
|
}
|
|
620
458
|
class JavaScriptDelegateSender extends rpc_2.JavaSender {
|
|
@@ -622,18 +460,13 @@ class JavaScriptDelegateSender extends rpc_2.JavaSender {
|
|
|
622
460
|
super();
|
|
623
461
|
this.javascriptSender = javascriptSender;
|
|
624
462
|
}
|
|
625
|
-
visit(tree, p, parent) {
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
return this.javascriptSender.visit(tree, p, parent);
|
|
633
|
-
}
|
|
634
|
-
// Otherwise handle as a Java element
|
|
635
|
-
return _super.visit.call(this, tree, p, parent);
|
|
636
|
-
});
|
|
463
|
+
async visit(tree, p, parent) {
|
|
464
|
+
// Delegate to JavaScript sender if this is a JavaScript element
|
|
465
|
+
if ((0, tree_1.isJavaScript)(tree)) {
|
|
466
|
+
return this.javascriptSender.visit(tree, p, parent);
|
|
467
|
+
}
|
|
468
|
+
// Otherwise handle as a Java element
|
|
469
|
+
return super.visit(tree, p, parent);
|
|
637
470
|
}
|
|
638
471
|
}
|
|
639
472
|
class JavaScriptReceiver extends visitor_1.JavaScriptVisitor {
|
|
@@ -641,726 +474,573 @@ class JavaScriptReceiver extends visitor_1.JavaScriptVisitor {
|
|
|
641
474
|
super();
|
|
642
475
|
this.delegate = new JavaScriptDelegateReceiver(this);
|
|
643
476
|
}
|
|
644
|
-
visit(tree, p, parent) {
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
}
|
|
648
|
-
return
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
return
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
return
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
return
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
}
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
return
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
}
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
}
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
}
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
return
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
}
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
return
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
return
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
}
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
}
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
name: yield q.receive(namespacedName.name, el => this.visitLeftPadded(el, q))
|
|
1212
|
-
};
|
|
1213
|
-
return (0, util_1.updateIfChanged)(namespacedName, updates);
|
|
1214
|
-
});
|
|
1215
|
-
}
|
|
1216
|
-
visitIndexSignatureDeclaration(indexSignatureDeclaration, q) {
|
|
1217
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1218
|
-
const updates = {
|
|
1219
|
-
modifiers: yield q.receiveListDefined(indexSignatureDeclaration.modifiers, el => this.visitDefined(el, q)),
|
|
1220
|
-
parameters: yield q.receive(indexSignatureDeclaration.parameters, el => this.visitContainer(el, q)),
|
|
1221
|
-
typeExpression: yield q.receive(indexSignatureDeclaration.typeExpression, el => this.visitLeftPadded(el, q)),
|
|
1222
|
-
type: yield q.receive(indexSignatureDeclaration.type, el => this.visitType(el, q))
|
|
1223
|
-
};
|
|
1224
|
-
return (0, util_1.updateIfChanged)(indexSignatureDeclaration, updates);
|
|
1225
|
-
});
|
|
1226
|
-
}
|
|
1227
|
-
visitComputedPropertyMethodDeclaration(computedPropMethod, q) {
|
|
1228
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1229
|
-
const updates = {
|
|
1230
|
-
leadingAnnotations: yield q.receiveListDefined(computedPropMethod.leadingAnnotations, el => this.visitDefined(el, q)),
|
|
1231
|
-
modifiers: yield q.receiveListDefined(computedPropMethod.modifiers, el => this.visitDefined(el, q)),
|
|
1232
|
-
typeParameters: yield q.receive(computedPropMethod.typeParameters, el => this.visitDefined(el, q)),
|
|
1233
|
-
returnTypeExpression: yield q.receive(computedPropMethod.returnTypeExpression, el => this.visitDefined(el, q)),
|
|
1234
|
-
name: yield q.receive(computedPropMethod.name, el => this.visitDefined(el, q)),
|
|
1235
|
-
parameters: yield q.receive(computedPropMethod.parameters, el => this.visitContainer(el, q)),
|
|
1236
|
-
body: yield q.receive(computedPropMethod.body, el => this.visitDefined(el, q)),
|
|
1237
|
-
methodType: yield q.receive(computedPropMethod.methodType, el => this.visitType(el, q))
|
|
1238
|
-
};
|
|
1239
|
-
return (0, util_1.updateIfChanged)(computedPropMethod, updates);
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
visitForOfLoop(forOfLoop, q) {
|
|
1243
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1244
|
-
const updates = {
|
|
1245
|
-
await: yield q.receive(forOfLoop.await, space => this.visitSpace(space, q)),
|
|
1246
|
-
loop: yield q.receive(forOfLoop.loop, el => this.visitDefined(el, q))
|
|
1247
|
-
};
|
|
1248
|
-
return (0, util_1.updateIfChanged)(forOfLoop, updates);
|
|
1249
|
-
});
|
|
1250
|
-
}
|
|
1251
|
-
visitForInLoop(forInLoop, q) {
|
|
1252
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1253
|
-
const updates = {
|
|
1254
|
-
control: yield q.receive(forInLoop.control, el => this.visitDefined(el, q)),
|
|
1255
|
-
body: yield q.receive(forInLoop.body, el => this.visitRightPadded(el, q))
|
|
1256
|
-
};
|
|
1257
|
-
return (0, util_1.updateIfChanged)(forInLoop, updates);
|
|
1258
|
-
});
|
|
1259
|
-
}
|
|
1260
|
-
visitNamespaceDeclaration(namespaceDeclaration, q) {
|
|
1261
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1262
|
-
const updates = {
|
|
1263
|
-
modifiers: yield q.receiveListDefined(namespaceDeclaration.modifiers, el => this.visitDefined(el, q)),
|
|
1264
|
-
keywordType: yield q.receive(namespaceDeclaration.keywordType, el => this.visitLeftPadded(el, q)),
|
|
1265
|
-
name: yield q.receive(namespaceDeclaration.name, el => this.visitRightPadded(el, q)),
|
|
1266
|
-
body: yield q.receive(namespaceDeclaration.body, el => this.visitDefined(el, q))
|
|
1267
|
-
};
|
|
1268
|
-
return (0, util_1.updateIfChanged)(namespaceDeclaration, updates);
|
|
1269
|
-
});
|
|
1270
|
-
}
|
|
1271
|
-
visitTypeLiteral(typeLiteral, q) {
|
|
1272
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1273
|
-
const updates = {
|
|
1274
|
-
members: yield q.receive(typeLiteral.members, el => this.visitDefined(el, q)),
|
|
1275
|
-
type: yield q.receive(typeLiteral.type, el => this.visitType(el, q))
|
|
1276
|
-
};
|
|
1277
|
-
return (0, util_1.updateIfChanged)(typeLiteral, updates);
|
|
1278
|
-
});
|
|
1279
|
-
}
|
|
1280
|
-
visitArrayBindingPattern(arrayBindingPattern, q) {
|
|
1281
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1282
|
-
const updates = {
|
|
1283
|
-
elements: yield q.receive(arrayBindingPattern.elements, el => this.visitContainer(el, q)),
|
|
1284
|
-
type: yield q.receive(arrayBindingPattern.type, el => this.visitType(el, q))
|
|
1285
|
-
};
|
|
1286
|
-
return (0, util_1.updateIfChanged)(arrayBindingPattern, updates);
|
|
1287
|
-
});
|
|
1288
|
-
}
|
|
1289
|
-
visitBindingElement(bindingElement, q) {
|
|
1290
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1291
|
-
const updates = {
|
|
1292
|
-
propertyName: yield q.receive(bindingElement.propertyName, el => this.visitRightPadded(el, q)),
|
|
1293
|
-
name: yield q.receive(bindingElement.name, el => this.visitDefined(el, q)),
|
|
1294
|
-
initializer: yield q.receive(bindingElement.initializer, el => this.visitLeftPadded(el, q)),
|
|
1295
|
-
variableType: yield q.receive(bindingElement.variableType, el => this.visitType(el, q))
|
|
1296
|
-
};
|
|
1297
|
-
return (0, util_1.updateIfChanged)(bindingElement, updates);
|
|
1298
|
-
});
|
|
1299
|
-
}
|
|
1300
|
-
visitExportDeclaration(exportDeclaration, q) {
|
|
1301
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1302
|
-
const updates = {
|
|
1303
|
-
modifiers: yield q.receiveListDefined(exportDeclaration.modifiers, el => this.visitDefined(el, q)),
|
|
1304
|
-
typeOnly: yield q.receive(exportDeclaration.typeOnly, el => this.visitLeftPadded(el, q)),
|
|
1305
|
-
exportClause: yield q.receive(exportDeclaration.exportClause, el => this.visitDefined(el, q)),
|
|
1306
|
-
moduleSpecifier: yield q.receive(exportDeclaration.moduleSpecifier, el => this.visitLeftPadded(el, q)),
|
|
1307
|
-
attributes: yield q.receive(exportDeclaration.attributes, el => this.visitDefined(el, q))
|
|
1308
|
-
};
|
|
1309
|
-
return (0, util_1.updateIfChanged)(exportDeclaration, updates);
|
|
1310
|
-
});
|
|
1311
|
-
}
|
|
1312
|
-
visitExportAssignment(exportAssignment, q) {
|
|
1313
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1314
|
-
const updates = {
|
|
1315
|
-
exportEquals: yield q.receive(exportAssignment.exportEquals),
|
|
1316
|
-
expression: yield q.receive(exportAssignment.expression, el => this.visitLeftPadded(el, q))
|
|
1317
|
-
};
|
|
1318
|
-
return (0, util_1.updateIfChanged)(exportAssignment, updates);
|
|
1319
|
-
});
|
|
1320
|
-
}
|
|
1321
|
-
visitNamedExports(namedExports, q) {
|
|
1322
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1323
|
-
const updates = {
|
|
1324
|
-
elements: yield q.receive(namedExports.elements, el => this.visitContainer(el, q)),
|
|
1325
|
-
type: yield q.receive(namedExports.type, el => this.visitType(el, q))
|
|
1326
|
-
};
|
|
1327
|
-
return (0, util_1.updateIfChanged)(namedExports, updates);
|
|
1328
|
-
});
|
|
1329
|
-
}
|
|
1330
|
-
visitExportSpecifier(exportSpecifier, q) {
|
|
1331
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1332
|
-
const updates = {
|
|
1333
|
-
typeOnly: yield q.receive(exportSpecifier.typeOnly, el => this.visitLeftPadded(el, q)),
|
|
1334
|
-
specifier: yield q.receive(exportSpecifier.specifier, el => this.visitDefined(el, q)),
|
|
1335
|
-
type: yield q.receive(exportSpecifier.type, el => this.visitType(el, q))
|
|
1336
|
-
};
|
|
1337
|
-
return (0, util_1.updateIfChanged)(exportSpecifier, updates);
|
|
1338
|
-
});
|
|
1339
|
-
}
|
|
1340
|
-
visitRightPadded(right, q) {
|
|
1341
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1342
|
-
return this.delegate.visitRightPadded(right, q);
|
|
1343
|
-
});
|
|
1344
|
-
}
|
|
1345
|
-
visitLeftPadded(left, q) {
|
|
1346
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1347
|
-
return this.delegate.visitLeftPadded(left, q);
|
|
1348
|
-
});
|
|
1349
|
-
}
|
|
1350
|
-
visitContainer(container, q) {
|
|
1351
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1352
|
-
return this.delegate.visitContainer(container, q);
|
|
1353
|
-
});
|
|
1354
|
-
}
|
|
1355
|
-
visitSpace(space, q) {
|
|
1356
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1357
|
-
return this.delegate.visitSpace(space, q);
|
|
1358
|
-
});
|
|
1359
|
-
}
|
|
1360
|
-
visitType(javaType, q) {
|
|
1361
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1362
|
-
return this.delegate.visitType(javaType, q);
|
|
1363
|
-
});
|
|
477
|
+
async visit(tree, p, parent) {
|
|
478
|
+
if ((0, tree_1.isJavaScript)(tree)) {
|
|
479
|
+
return super.visit(tree, p, parent);
|
|
480
|
+
}
|
|
481
|
+
return this.delegate.visit(tree, p, parent);
|
|
482
|
+
}
|
|
483
|
+
async preVisit(j, q) {
|
|
484
|
+
const updates = {
|
|
485
|
+
id: await q.receive(j.id),
|
|
486
|
+
prefix: await q.receive(j.prefix, space => this.visitSpace(space, q)),
|
|
487
|
+
markers: await q.receive(j.markers)
|
|
488
|
+
};
|
|
489
|
+
return (0, util_1.updateIfChanged)(j, updates);
|
|
490
|
+
}
|
|
491
|
+
async visitJsCompilationUnit(cu, q) {
|
|
492
|
+
const updates = {
|
|
493
|
+
sourcePath: await q.receive(cu.sourcePath),
|
|
494
|
+
charsetName: await q.receive(cu.charsetName),
|
|
495
|
+
charsetBomMarked: await q.receive(cu.charsetBomMarked),
|
|
496
|
+
checksum: await q.receive(cu.checksum),
|
|
497
|
+
fileAttributes: await q.receive(cu.fileAttributes),
|
|
498
|
+
statements: await q.receiveListDefined(cu.statements, stmt => this.visitRightPadded(stmt, q)),
|
|
499
|
+
eof: await q.receive(cu.eof, space => this.visitSpace(space, q))
|
|
500
|
+
};
|
|
501
|
+
return (0, util_1.updateIfChanged)(cu, updates);
|
|
502
|
+
}
|
|
503
|
+
async visitAlias(alias, q) {
|
|
504
|
+
const updates = {
|
|
505
|
+
propertyName: await q.receive(alias.propertyName, el => this.visitRightPadded(el, q)),
|
|
506
|
+
alias: await q.receive(alias.alias, el => this.visitDefined(el, q))
|
|
507
|
+
};
|
|
508
|
+
return (0, util_1.updateIfChanged)(alias, updates);
|
|
509
|
+
}
|
|
510
|
+
async visitArrowFunction(arrowFunction, q) {
|
|
511
|
+
const updates = {
|
|
512
|
+
leadingAnnotations: await q.receiveListDefined(arrowFunction.leadingAnnotations, el => this.visitDefined(el, q)),
|
|
513
|
+
modifiers: await q.receiveListDefined(arrowFunction.modifiers, el => this.visitDefined(el, q)),
|
|
514
|
+
typeParameters: await q.receive(arrowFunction.typeParameters, el => this.visitDefined(el, q)),
|
|
515
|
+
lambda: await q.receive(arrowFunction.lambda, el => this.visitDefined(el, q)),
|
|
516
|
+
returnTypeExpression: await q.receive(arrowFunction.returnTypeExpression, el => this.visitDefined(el, q))
|
|
517
|
+
};
|
|
518
|
+
return (0, util_1.updateIfChanged)(arrowFunction, updates);
|
|
519
|
+
}
|
|
520
|
+
async visitAwait(anAwait, q) {
|
|
521
|
+
const updates = {
|
|
522
|
+
expression: await q.receive(anAwait.expression, el => this.visitDefined(el, q)),
|
|
523
|
+
type: await q.receive(anAwait.type, el => this.visitType(el, q))
|
|
524
|
+
};
|
|
525
|
+
return (0, util_1.updateIfChanged)(anAwait, updates);
|
|
526
|
+
}
|
|
527
|
+
async visitConditionalType(conditionalType, q) {
|
|
528
|
+
const updates = {
|
|
529
|
+
checkType: await q.receive(conditionalType.checkType, el => this.visitDefined(el, q)),
|
|
530
|
+
condition: await q.receive(conditionalType.condition, el => this.visitLeftPadded(el, q)),
|
|
531
|
+
type: await q.receive(conditionalType.type, el => this.visitType(el, q))
|
|
532
|
+
};
|
|
533
|
+
return (0, util_1.updateIfChanged)(conditionalType, updates);
|
|
534
|
+
}
|
|
535
|
+
async visitDelete(delete_, q) {
|
|
536
|
+
const updates = {
|
|
537
|
+
expression: await q.receive(delete_.expression, el => this.visitDefined(el, q))
|
|
538
|
+
};
|
|
539
|
+
return (0, util_1.updateIfChanged)(delete_, updates);
|
|
540
|
+
}
|
|
541
|
+
async visitExpressionStatement(expressionStatement, q) {
|
|
542
|
+
const updates = {
|
|
543
|
+
expression: await q.receive(expressionStatement.expression, el => this.visitDefined(el, q))
|
|
544
|
+
};
|
|
545
|
+
return (0, util_1.updateIfChanged)(expressionStatement, updates);
|
|
546
|
+
}
|
|
547
|
+
async visitExpressionWithTypeArguments(expressionWithTypeArguments, q) {
|
|
548
|
+
const updates = {
|
|
549
|
+
clazz: await q.receive(expressionWithTypeArguments.clazz, el => this.visitDefined(el, q)),
|
|
550
|
+
typeArguments: await q.receive(expressionWithTypeArguments.typeArguments, el => this.visitContainer(el, q)),
|
|
551
|
+
type: await q.receive(expressionWithTypeArguments.type, el => this.visitType(el, q))
|
|
552
|
+
};
|
|
553
|
+
return (0, util_1.updateIfChanged)(expressionWithTypeArguments, updates);
|
|
554
|
+
}
|
|
555
|
+
async visitFunctionCall(functionCall, q) {
|
|
556
|
+
const updates = {
|
|
557
|
+
function: await q.receive(functionCall.function, select => this.visitRightPadded(select, q)),
|
|
558
|
+
typeParameters: await q.receive(functionCall.typeParameters, typeParams => this.visitContainer(typeParams, q)),
|
|
559
|
+
arguments: await q.receive(functionCall.arguments, args => this.visitContainer(args, q)),
|
|
560
|
+
methodType: await q.receive(functionCall.methodType, type => this.visitType(type, q))
|
|
561
|
+
};
|
|
562
|
+
return (0, util_1.updateIfChanged)(functionCall, updates);
|
|
563
|
+
}
|
|
564
|
+
async visitFunctionType(functionType, q) {
|
|
565
|
+
const updates = {
|
|
566
|
+
modifiers: await q.receiveListDefined(functionType.modifiers, el => this.visitDefined(el, q)),
|
|
567
|
+
constructorType: await q.receive(functionType.constructorType, el => this.visitLeftPadded(el, q)),
|
|
568
|
+
typeParameters: await q.receive(functionType.typeParameters, el => this.visitDefined(el, q)),
|
|
569
|
+
parameters: await q.receive(functionType.parameters, el => this.visitContainer(el, q)),
|
|
570
|
+
returnType: await q.receive(functionType.returnType, el => this.visitLeftPadded(el, q))
|
|
571
|
+
};
|
|
572
|
+
return (0, util_1.updateIfChanged)(functionType, updates);
|
|
573
|
+
}
|
|
574
|
+
async visitInferType(inferType, q) {
|
|
575
|
+
const updates = {
|
|
576
|
+
typeParameter: await q.receive(inferType.typeParameter, el => this.visitLeftPadded(el, q)),
|
|
577
|
+
type: await q.receive(inferType.type, el => this.visitType(el, q))
|
|
578
|
+
};
|
|
579
|
+
return (0, util_1.updateIfChanged)(inferType, updates);
|
|
580
|
+
}
|
|
581
|
+
async visitImportType(importType, q) {
|
|
582
|
+
const updates = {
|
|
583
|
+
hasTypeof: await q.receive(importType.hasTypeof, el => this.visitRightPadded(el, q)),
|
|
584
|
+
argumentAndAttributes: await q.receive(importType.argumentAndAttributes, el => this.visitContainer(el, q)),
|
|
585
|
+
qualifier: await q.receive(importType.qualifier, el => this.visitLeftPadded(el, q)),
|
|
586
|
+
typeArguments: await q.receive(importType.typeArguments, el => this.visitContainer(el, q)),
|
|
587
|
+
type: await q.receive(importType.type, el => this.visitType(el, q))
|
|
588
|
+
};
|
|
589
|
+
return (0, util_1.updateIfChanged)(importType, updates);
|
|
590
|
+
}
|
|
591
|
+
async visitImportDeclaration(jsImport, q) {
|
|
592
|
+
const updates = {
|
|
593
|
+
modifiers: await q.receiveListDefined(jsImport.modifiers, el => this.visitDefined(el, q)),
|
|
594
|
+
importClause: await q.receive(jsImport.importClause, el => this.visitDefined(el, q)),
|
|
595
|
+
moduleSpecifier: await q.receive(jsImport.moduleSpecifier, el => this.visitLeftPadded(el, q)),
|
|
596
|
+
attributes: await q.receive(jsImport.attributes, el => this.visitDefined(el, q)),
|
|
597
|
+
initializer: await q.receive(jsImport.initializer, el => this.visitLeftPadded(el, q))
|
|
598
|
+
};
|
|
599
|
+
return (0, util_1.updateIfChanged)(jsImport, updates);
|
|
600
|
+
}
|
|
601
|
+
async visitImportClause(jsImportClause, q) {
|
|
602
|
+
const updates = {
|
|
603
|
+
typeOnly: await q.receive(jsImportClause.typeOnly),
|
|
604
|
+
name: await q.receive(jsImportClause.name, el => this.visitRightPadded(el, q)),
|
|
605
|
+
namedBindings: await q.receive(jsImportClause.namedBindings, el => this.visitDefined(el, q))
|
|
606
|
+
};
|
|
607
|
+
return (0, util_1.updateIfChanged)(jsImportClause, updates);
|
|
608
|
+
}
|
|
609
|
+
async visitNamedImports(namedImports, q) {
|
|
610
|
+
const updates = {
|
|
611
|
+
elements: await q.receive(namedImports.elements, el => this.visitContainer(el, q)),
|
|
612
|
+
type: await q.receive(namedImports.type, el => this.visitType(el, q))
|
|
613
|
+
};
|
|
614
|
+
return (0, util_1.updateIfChanged)(namedImports, updates);
|
|
615
|
+
}
|
|
616
|
+
async visitImportSpecifier(jsImportSpecifier, q) {
|
|
617
|
+
const updates = {
|
|
618
|
+
importType: await q.receive(jsImportSpecifier.importType, el => this.visitLeftPadded(el, q)),
|
|
619
|
+
specifier: await q.receive(jsImportSpecifier.specifier, el => this.visitDefined(el, q)),
|
|
620
|
+
type: await q.receive(jsImportSpecifier.type, el => this.visitType(el, q))
|
|
621
|
+
};
|
|
622
|
+
return (0, util_1.updateIfChanged)(jsImportSpecifier, updates);
|
|
623
|
+
}
|
|
624
|
+
async visitImportAttributes(importAttributes, q) {
|
|
625
|
+
const updates = {
|
|
626
|
+
token: await q.receive(importAttributes.token),
|
|
627
|
+
elements: await q.receive(importAttributes.elements, el => this.visitContainer(el, q))
|
|
628
|
+
};
|
|
629
|
+
return (0, util_1.updateIfChanged)(importAttributes, updates);
|
|
630
|
+
}
|
|
631
|
+
async visitImportTypeAttributes(importTypeAttributes, q) {
|
|
632
|
+
const updates = {
|
|
633
|
+
token: await q.receive(importTypeAttributes.token, el => this.visitRightPadded(el, q)),
|
|
634
|
+
elements: await q.receive(importTypeAttributes.elements, el => this.visitContainer(el, q)),
|
|
635
|
+
end: await q.receive(importTypeAttributes.end, el => this.visitSpace(el, q))
|
|
636
|
+
};
|
|
637
|
+
return (0, util_1.updateIfChanged)(importTypeAttributes, updates);
|
|
638
|
+
}
|
|
639
|
+
async visitImportAttribute(importAttribute, q) {
|
|
640
|
+
const updates = {
|
|
641
|
+
name: await q.receive(importAttribute.name, el => this.visitDefined(el, q)),
|
|
642
|
+
value: await q.receive(importAttribute.value, el => this.visitLeftPadded(el, q))
|
|
643
|
+
};
|
|
644
|
+
return (0, util_1.updateIfChanged)(importAttribute, updates);
|
|
645
|
+
}
|
|
646
|
+
async visitBinaryExtensions(binary, q) {
|
|
647
|
+
const updates = {
|
|
648
|
+
left: await q.receive(binary.left, el => this.visitDefined(el, q)),
|
|
649
|
+
operator: await q.receive(binary.operator, el => this.visitLeftPadded(el, q)),
|
|
650
|
+
right: await q.receive(binary.right, el => this.visitDefined(el, q)),
|
|
651
|
+
type: await q.receive(binary.type, el => this.visitType(el, q))
|
|
652
|
+
};
|
|
653
|
+
return (0, util_1.updateIfChanged)(binary, updates);
|
|
654
|
+
}
|
|
655
|
+
async visitLiteralType(literalType, q) {
|
|
656
|
+
const updates = {
|
|
657
|
+
literal: await q.receive(literalType.literal, el => this.visitDefined(el, q)),
|
|
658
|
+
type: await q.receive(literalType.type, el => this.visitType(el, q))
|
|
659
|
+
};
|
|
660
|
+
return (0, util_1.updateIfChanged)(literalType, updates);
|
|
661
|
+
}
|
|
662
|
+
async visitMappedType(mappedType, q) {
|
|
663
|
+
const updates = {
|
|
664
|
+
prefixToken: await q.receive(mappedType.prefixToken, el => this.visitLeftPadded(el, q)),
|
|
665
|
+
hasReadonly: await q.receive(mappedType.hasReadonly, el => this.visitLeftPadded(el, q)),
|
|
666
|
+
keysRemapping: await q.receive(mappedType.keysRemapping, el => this.visitDefined(el, q)),
|
|
667
|
+
suffixToken: await q.receive(mappedType.suffixToken, el => this.visitLeftPadded(el, q)),
|
|
668
|
+
hasQuestionToken: await q.receive(mappedType.hasQuestionToken, el => this.visitLeftPadded(el, q)),
|
|
669
|
+
valueType: await q.receive(mappedType.valueType, el => this.visitContainer(el, q)),
|
|
670
|
+
type: await q.receive(mappedType.type, el => this.visitType(el, q))
|
|
671
|
+
};
|
|
672
|
+
return (0, util_1.updateIfChanged)(mappedType, updates);
|
|
673
|
+
}
|
|
674
|
+
async visitMappedTypeKeysRemapping(keysRemapping, q) {
|
|
675
|
+
const updates = {
|
|
676
|
+
typeParameter: await q.receive(keysRemapping.typeParameter, el => this.visitRightPadded(el, q)),
|
|
677
|
+
nameType: await q.receive(keysRemapping.nameType, el => this.visitRightPadded(el, q))
|
|
678
|
+
};
|
|
679
|
+
return (0, util_1.updateIfChanged)(keysRemapping, updates);
|
|
680
|
+
}
|
|
681
|
+
async visitMappedTypeParameter(mappedTypeParameter, q) {
|
|
682
|
+
const updates = {
|
|
683
|
+
name: await q.receive(mappedTypeParameter.name, el => this.visitDefined(el, q)),
|
|
684
|
+
iterateType: await q.receive(mappedTypeParameter.iterateType, el => this.visitLeftPadded(el, q))
|
|
685
|
+
};
|
|
686
|
+
return (0, util_1.updateIfChanged)(mappedTypeParameter, updates);
|
|
687
|
+
}
|
|
688
|
+
async visitObjectBindingPattern(objectBindingPattern, q) {
|
|
689
|
+
const updates = {
|
|
690
|
+
leadingAnnotations: await q.receiveListDefined(objectBindingPattern.leadingAnnotations, el => this.visitDefined(el, q)),
|
|
691
|
+
modifiers: await q.receiveListDefined(objectBindingPattern.modifiers, el => this.visitDefined(el, q)),
|
|
692
|
+
typeExpression: await q.receive(objectBindingPattern.typeExpression, el => this.visitDefined(el, q)),
|
|
693
|
+
bindings: await q.receive(objectBindingPattern.bindings, el => this.visitContainer(el, q)),
|
|
694
|
+
initializer: await q.receive(objectBindingPattern.initializer, el => this.visitLeftPadded(el, q))
|
|
695
|
+
};
|
|
696
|
+
return (0, util_1.updateIfChanged)(objectBindingPattern, updates);
|
|
697
|
+
}
|
|
698
|
+
async visitPropertyAssignment(propertyAssignment, q) {
|
|
699
|
+
const updates = {
|
|
700
|
+
name: await q.receive(propertyAssignment.name, el => this.visitRightPadded(el, q)),
|
|
701
|
+
assigmentToken: await q.receive(propertyAssignment.assigmentToken),
|
|
702
|
+
initializer: await q.receive(propertyAssignment.initializer, el => this.visitDefined(el, q))
|
|
703
|
+
};
|
|
704
|
+
return (0, util_1.updateIfChanged)(propertyAssignment, updates);
|
|
705
|
+
}
|
|
706
|
+
async visitSatisfiesExpression(satisfiesExpression, q) {
|
|
707
|
+
const updates = {
|
|
708
|
+
expression: await q.receive(satisfiesExpression.expression, el => this.visitDefined(el, q)),
|
|
709
|
+
satisfiesType: await q.receive(satisfiesExpression.satisfiesType, el => this.visitLeftPadded(el, q)),
|
|
710
|
+
type: await q.receive(satisfiesExpression.type, el => this.visitType(el, q))
|
|
711
|
+
};
|
|
712
|
+
return (0, util_1.updateIfChanged)(satisfiesExpression, updates);
|
|
713
|
+
}
|
|
714
|
+
async visitScopedVariableDeclarations(scopedVariableDeclarations, q) {
|
|
715
|
+
const updates = {
|
|
716
|
+
modifiers: await q.receiveListDefined(scopedVariableDeclarations.modifiers, el => this.visitDefined(el, q)),
|
|
717
|
+
variables: await q.receiveListDefined(scopedVariableDeclarations.variables, el => this.visitRightPadded(el, q))
|
|
718
|
+
};
|
|
719
|
+
return (0, util_1.updateIfChanged)(scopedVariableDeclarations, updates);
|
|
720
|
+
}
|
|
721
|
+
async visitShebang(shebang, q) {
|
|
722
|
+
const updates = {
|
|
723
|
+
text: await q.receive(shebang.text)
|
|
724
|
+
};
|
|
725
|
+
return (0, util_1.updateIfChanged)(shebang, updates);
|
|
726
|
+
}
|
|
727
|
+
async visitSpread(spread, q) {
|
|
728
|
+
const updates = {
|
|
729
|
+
expression: await q.receive(spread.expression, el => this.visitDefined(el, q)),
|
|
730
|
+
type: await q.receive(spread.type, el => this.visitType(el, q))
|
|
731
|
+
};
|
|
732
|
+
return (0, util_1.updateIfChanged)(spread, updates);
|
|
733
|
+
}
|
|
734
|
+
async visitStatementExpression(statementExpression, q) {
|
|
735
|
+
const updates = {
|
|
736
|
+
statement: await q.receive(statementExpression.statement, el => this.visitDefined(el, q))
|
|
737
|
+
};
|
|
738
|
+
return (0, util_1.updateIfChanged)(statementExpression, updates);
|
|
739
|
+
}
|
|
740
|
+
async visitTaggedTemplateExpression(taggedTemplateExpression, q) {
|
|
741
|
+
const updates = {
|
|
742
|
+
tag: await q.receive(taggedTemplateExpression.tag, el => this.visitRightPadded(el, q)),
|
|
743
|
+
typeArguments: await q.receive(taggedTemplateExpression.typeArguments, el => this.visitContainer(el, q)),
|
|
744
|
+
templateExpression: await q.receive(taggedTemplateExpression.templateExpression, el => this.visitDefined(el, q)),
|
|
745
|
+
type: await q.receive(taggedTemplateExpression.type, el => this.visitType(el, q))
|
|
746
|
+
};
|
|
747
|
+
return (0, util_1.updateIfChanged)(taggedTemplateExpression, updates);
|
|
748
|
+
}
|
|
749
|
+
async visitTemplateExpression(templateExpression, q) {
|
|
750
|
+
const updates = {
|
|
751
|
+
head: await q.receive(templateExpression.head, el => this.visitDefined(el, q)),
|
|
752
|
+
spans: await q.receiveListDefined(templateExpression.spans, el => this.visitRightPadded(el, q)),
|
|
753
|
+
type: await q.receive(templateExpression.type, el => this.visitType(el, q))
|
|
754
|
+
};
|
|
755
|
+
return (0, util_1.updateIfChanged)(templateExpression, updates);
|
|
756
|
+
}
|
|
757
|
+
async visitTemplateExpressionSpan(span, q) {
|
|
758
|
+
const updates = {
|
|
759
|
+
expression: await q.receive(span.expression, el => this.visitDefined(el, q)),
|
|
760
|
+
tail: await q.receive(span.tail, el => this.visitDefined(el, q))
|
|
761
|
+
};
|
|
762
|
+
return (0, util_1.updateIfChanged)(span, updates);
|
|
763
|
+
}
|
|
764
|
+
async visitTuple(tuple, q) {
|
|
765
|
+
const updates = {
|
|
766
|
+
elements: await q.receive(tuple.elements, el => this.visitContainer(el, q)),
|
|
767
|
+
type: await q.receive(tuple.type, el => this.visitType(el, q))
|
|
768
|
+
};
|
|
769
|
+
return (0, util_1.updateIfChanged)(tuple, updates);
|
|
770
|
+
}
|
|
771
|
+
async visitTypeDeclaration(typeDeclaration, q) {
|
|
772
|
+
const updates = {
|
|
773
|
+
modifiers: await q.receiveListDefined(typeDeclaration.modifiers, el => this.visitDefined(el, q)),
|
|
774
|
+
name: await q.receive(typeDeclaration.name, el => this.visitLeftPadded(el, q)),
|
|
775
|
+
typeParameters: await q.receive(typeDeclaration.typeParameters, el => this.visitDefined(el, q)),
|
|
776
|
+
initializer: await q.receive(typeDeclaration.initializer, el => this.visitLeftPadded(el, q)),
|
|
777
|
+
type: await q.receive(typeDeclaration.type, el => this.visitType(el, q))
|
|
778
|
+
};
|
|
779
|
+
return (0, util_1.updateIfChanged)(typeDeclaration, updates);
|
|
780
|
+
}
|
|
781
|
+
async visitTypeOf(typeOf, q) {
|
|
782
|
+
const updates = {
|
|
783
|
+
expression: await q.receive(typeOf.expression, el => this.visitDefined(el, q)),
|
|
784
|
+
type: await q.receive(typeOf.type, el => this.visitType(el, q))
|
|
785
|
+
};
|
|
786
|
+
return (0, util_1.updateIfChanged)(typeOf, updates);
|
|
787
|
+
}
|
|
788
|
+
async visitTypeTreeExpression(typeTreeExpression, q) {
|
|
789
|
+
const updates = {
|
|
790
|
+
expression: await q.receive(typeTreeExpression.expression, el => this.visitDefined(el, q))
|
|
791
|
+
};
|
|
792
|
+
return (0, util_1.updateIfChanged)(typeTreeExpression, updates);
|
|
793
|
+
}
|
|
794
|
+
async visitAs(as_, q) {
|
|
795
|
+
const updates = {
|
|
796
|
+
left: await q.receive(as_.left, el => this.visitRightPadded(el, q)),
|
|
797
|
+
right: await q.receive(as_.right, el => this.visitDefined(el, q)),
|
|
798
|
+
type: await q.receive(as_.type, el => this.visitType(el, q))
|
|
799
|
+
};
|
|
800
|
+
return (0, util_1.updateIfChanged)(as_, updates);
|
|
801
|
+
}
|
|
802
|
+
async visitAssignmentOperationExtensions(assignmentOperation, q) {
|
|
803
|
+
const updates = {
|
|
804
|
+
variable: await q.receive(assignmentOperation.variable, el => this.visitDefined(el, q)),
|
|
805
|
+
operator: await q.receive(assignmentOperation.operator, el => this.visitLeftPadded(el, q)),
|
|
806
|
+
assignment: await q.receive(assignmentOperation.assignment, el => this.visitDefined(el, q)),
|
|
807
|
+
type: await q.receive(assignmentOperation.type, el => this.visitType(el, q))
|
|
808
|
+
};
|
|
809
|
+
return (0, util_1.updateIfChanged)(assignmentOperation, updates);
|
|
810
|
+
}
|
|
811
|
+
async visitIndexedAccessType(indexedAccessType, q) {
|
|
812
|
+
const updates = {
|
|
813
|
+
objectType: await q.receive(indexedAccessType.objectType, el => this.visitDefined(el, q)),
|
|
814
|
+
indexType: await q.receive(indexedAccessType.indexType, el => this.visitDefined(el, q)),
|
|
815
|
+
type: await q.receive(indexedAccessType.type, el => this.visitType(el, q))
|
|
816
|
+
};
|
|
817
|
+
return (0, util_1.updateIfChanged)(indexedAccessType, updates);
|
|
818
|
+
}
|
|
819
|
+
async visitIndexedAccessTypeIndexType(indexType, q) {
|
|
820
|
+
const updates = {
|
|
821
|
+
element: await q.receive(indexType.element, el => this.visitRightPadded(el, q)),
|
|
822
|
+
type: await q.receive(indexType.type, el => this.visitType(el, q))
|
|
823
|
+
};
|
|
824
|
+
return (0, util_1.updateIfChanged)(indexType, updates);
|
|
825
|
+
}
|
|
826
|
+
async visitTypeQuery(typeQuery, q) {
|
|
827
|
+
const updates = {
|
|
828
|
+
typeExpression: await q.receive(typeQuery.typeExpression, el => this.visitDefined(el, q)),
|
|
829
|
+
typeArguments: await q.receive(typeQuery.typeArguments, el => this.visitContainer(el, q)),
|
|
830
|
+
type: await q.receive(typeQuery.type, el => this.visitType(el, q))
|
|
831
|
+
};
|
|
832
|
+
return (0, util_1.updateIfChanged)(typeQuery, updates);
|
|
833
|
+
}
|
|
834
|
+
async visitTypeInfo(typeInfo, q) {
|
|
835
|
+
const updates = {
|
|
836
|
+
typeIdentifier: await q.receive(typeInfo.typeIdentifier, el => this.visitDefined(el, q))
|
|
837
|
+
};
|
|
838
|
+
return (0, util_1.updateIfChanged)(typeInfo, updates);
|
|
839
|
+
}
|
|
840
|
+
async visitComputedPropertyName(computedPropertyName, q) {
|
|
841
|
+
const updates = {
|
|
842
|
+
expression: await q.receive(computedPropertyName.expression, el => this.visitRightPadded(el, q))
|
|
843
|
+
};
|
|
844
|
+
return (0, util_1.updateIfChanged)(computedPropertyName, updates);
|
|
845
|
+
}
|
|
846
|
+
async visitTypeOperator(typeOperator, q) {
|
|
847
|
+
const updates = {
|
|
848
|
+
operator: await q.receive(typeOperator.operator),
|
|
849
|
+
expression: await q.receive(typeOperator.expression, el => this.visitLeftPadded(el, q))
|
|
850
|
+
};
|
|
851
|
+
return (0, util_1.updateIfChanged)(typeOperator, updates);
|
|
852
|
+
}
|
|
853
|
+
async visitTypePredicate(typePredicate, q) {
|
|
854
|
+
const updates = {
|
|
855
|
+
asserts: await q.receive(typePredicate.asserts, el => this.visitLeftPadded(el, q)),
|
|
856
|
+
parameterName: await q.receive(typePredicate.parameterName, el => this.visitDefined(el, q)),
|
|
857
|
+
expression: await q.receive(typePredicate.expression, el => this.visitLeftPadded(el, q)),
|
|
858
|
+
type: await q.receive(typePredicate.type, el => this.visitType(el, q))
|
|
859
|
+
};
|
|
860
|
+
return (0, util_1.updateIfChanged)(typePredicate, updates);
|
|
861
|
+
}
|
|
862
|
+
async visitUnion(union, q) {
|
|
863
|
+
const updates = {
|
|
864
|
+
types: await q.receiveListDefined(union.types, el => this.visitRightPadded(el, q)),
|
|
865
|
+
type: await q.receive(union.type, el => this.visitType(el, q))
|
|
866
|
+
};
|
|
867
|
+
return (0, util_1.updateIfChanged)(union, updates);
|
|
868
|
+
}
|
|
869
|
+
async visitIntersection(intersection, q) {
|
|
870
|
+
const updates = {
|
|
871
|
+
types: await q.receiveListDefined(intersection.types, el => this.visitRightPadded(el, q)),
|
|
872
|
+
type: await q.receive(intersection.type, el => this.visitType(el, q))
|
|
873
|
+
};
|
|
874
|
+
return (0, util_1.updateIfChanged)(intersection, updates);
|
|
875
|
+
}
|
|
876
|
+
async visitVoid(void_, q) {
|
|
877
|
+
const updates = {
|
|
878
|
+
expression: await q.receive(void_.expression, el => this.visitDefined(el, q))
|
|
879
|
+
};
|
|
880
|
+
return (0, util_1.updateIfChanged)(void_, updates);
|
|
881
|
+
}
|
|
882
|
+
async visitWithStatement(withStatement, q) {
|
|
883
|
+
const updates = {
|
|
884
|
+
expression: await q.receive(withStatement.expression, el => this.visitDefined(el, q)),
|
|
885
|
+
body: await q.receive(withStatement.body, el => this.visitRightPadded(el, q))
|
|
886
|
+
};
|
|
887
|
+
return (0, util_1.updateIfChanged)(withStatement, updates);
|
|
888
|
+
}
|
|
889
|
+
async visitJsxTag(tag, q) {
|
|
890
|
+
const updates = {
|
|
891
|
+
openName: await q.receive(tag.openName, el => this.visitLeftPadded(el, q)),
|
|
892
|
+
typeArguments: await q.receive(tag.typeArguments, el => this.visitContainer(el, q)),
|
|
893
|
+
afterName: await q.receive(tag.afterName, space => this.visitSpace(space, q)),
|
|
894
|
+
attributes: await q.receiveListDefined(tag.attributes, attr => this.visitRightPadded(attr, q)),
|
|
895
|
+
selfClosing: await q.receive(tag.selfClosing, space => this.visitSpace(space, q)),
|
|
896
|
+
children: await q.receiveList(tag.children, child => this.visit(child, q)),
|
|
897
|
+
closingName: await q.receive(tag.closingName, el => this.visitLeftPadded(el, q)),
|
|
898
|
+
afterClosingName: await q.receive(tag.afterClosingName, el => this.visitSpace(el, q))
|
|
899
|
+
};
|
|
900
|
+
// Type assertion is needed due to `JSX.Tag` being a union type
|
|
901
|
+
return (0, util_1.updateIfChanged)(tag, updates);
|
|
902
|
+
}
|
|
903
|
+
async visitJsxAttribute(attribute, q) {
|
|
904
|
+
const updates = {
|
|
905
|
+
key: await q.receive(attribute.key, el => this.visitDefined(el, q)),
|
|
906
|
+
value: await q.receive(attribute.value, el => this.visitLeftPadded(el, q))
|
|
907
|
+
};
|
|
908
|
+
return (0, util_1.updateIfChanged)(attribute, updates);
|
|
909
|
+
}
|
|
910
|
+
async visitJsxSpreadAttribute(spreadAttribute, q) {
|
|
911
|
+
const updates = {
|
|
912
|
+
dots: await q.receive(spreadAttribute.dots, space => this.visitSpace(space, q)),
|
|
913
|
+
expression: await q.receive(spreadAttribute.expression, el => this.visitRightPadded(el, q))
|
|
914
|
+
};
|
|
915
|
+
return (0, util_1.updateIfChanged)(spreadAttribute, updates);
|
|
916
|
+
}
|
|
917
|
+
async visitJsxEmbeddedExpression(embeddedExpression, q) {
|
|
918
|
+
const updates = {
|
|
919
|
+
expression: await q.receive(embeddedExpression.expression, el => this.visitRightPadded(el, q))
|
|
920
|
+
};
|
|
921
|
+
return (0, util_1.updateIfChanged)(embeddedExpression, updates);
|
|
922
|
+
}
|
|
923
|
+
async visitJsxNamespacedName(namespacedName, q) {
|
|
924
|
+
const updates = {
|
|
925
|
+
namespace: await q.receive(namespacedName.namespace, el => this.visitDefined(el, q)),
|
|
926
|
+
name: await q.receive(namespacedName.name, el => this.visitLeftPadded(el, q))
|
|
927
|
+
};
|
|
928
|
+
return (0, util_1.updateIfChanged)(namespacedName, updates);
|
|
929
|
+
}
|
|
930
|
+
async visitIndexSignatureDeclaration(indexSignatureDeclaration, q) {
|
|
931
|
+
const updates = {
|
|
932
|
+
modifiers: await q.receiveListDefined(indexSignatureDeclaration.modifiers, el => this.visitDefined(el, q)),
|
|
933
|
+
parameters: await q.receive(indexSignatureDeclaration.parameters, el => this.visitContainer(el, q)),
|
|
934
|
+
typeExpression: await q.receive(indexSignatureDeclaration.typeExpression, el => this.visitLeftPadded(el, q)),
|
|
935
|
+
type: await q.receive(indexSignatureDeclaration.type, el => this.visitType(el, q))
|
|
936
|
+
};
|
|
937
|
+
return (0, util_1.updateIfChanged)(indexSignatureDeclaration, updates);
|
|
938
|
+
}
|
|
939
|
+
async visitComputedPropertyMethodDeclaration(computedPropMethod, q) {
|
|
940
|
+
const updates = {
|
|
941
|
+
leadingAnnotations: await q.receiveListDefined(computedPropMethod.leadingAnnotations, el => this.visitDefined(el, q)),
|
|
942
|
+
modifiers: await q.receiveListDefined(computedPropMethod.modifiers, el => this.visitDefined(el, q)),
|
|
943
|
+
typeParameters: await q.receive(computedPropMethod.typeParameters, el => this.visitDefined(el, q)),
|
|
944
|
+
returnTypeExpression: await q.receive(computedPropMethod.returnTypeExpression, el => this.visitDefined(el, q)),
|
|
945
|
+
name: await q.receive(computedPropMethod.name, el => this.visitDefined(el, q)),
|
|
946
|
+
parameters: await q.receive(computedPropMethod.parameters, el => this.visitContainer(el, q)),
|
|
947
|
+
body: await q.receive(computedPropMethod.body, el => this.visitDefined(el, q)),
|
|
948
|
+
methodType: await q.receive(computedPropMethod.methodType, el => this.visitType(el, q))
|
|
949
|
+
};
|
|
950
|
+
return (0, util_1.updateIfChanged)(computedPropMethod, updates);
|
|
951
|
+
}
|
|
952
|
+
async visitForOfLoop(forOfLoop, q) {
|
|
953
|
+
const updates = {
|
|
954
|
+
await: await q.receive(forOfLoop.await, space => this.visitSpace(space, q)),
|
|
955
|
+
loop: await q.receive(forOfLoop.loop, el => this.visitDefined(el, q))
|
|
956
|
+
};
|
|
957
|
+
return (0, util_1.updateIfChanged)(forOfLoop, updates);
|
|
958
|
+
}
|
|
959
|
+
async visitForInLoop(forInLoop, q) {
|
|
960
|
+
const updates = {
|
|
961
|
+
control: await q.receive(forInLoop.control, el => this.visitDefined(el, q)),
|
|
962
|
+
body: await q.receive(forInLoop.body, el => this.visitRightPadded(el, q))
|
|
963
|
+
};
|
|
964
|
+
return (0, util_1.updateIfChanged)(forInLoop, updates);
|
|
965
|
+
}
|
|
966
|
+
async visitNamespaceDeclaration(namespaceDeclaration, q) {
|
|
967
|
+
const updates = {
|
|
968
|
+
modifiers: await q.receiveListDefined(namespaceDeclaration.modifiers, el => this.visitDefined(el, q)),
|
|
969
|
+
keywordType: await q.receive(namespaceDeclaration.keywordType, el => this.visitLeftPadded(el, q)),
|
|
970
|
+
name: await q.receive(namespaceDeclaration.name, el => this.visitRightPadded(el, q)),
|
|
971
|
+
body: await q.receive(namespaceDeclaration.body, el => this.visitDefined(el, q))
|
|
972
|
+
};
|
|
973
|
+
return (0, util_1.updateIfChanged)(namespaceDeclaration, updates);
|
|
974
|
+
}
|
|
975
|
+
async visitTypeLiteral(typeLiteral, q) {
|
|
976
|
+
const updates = {
|
|
977
|
+
members: await q.receive(typeLiteral.members, el => this.visitDefined(el, q)),
|
|
978
|
+
type: await q.receive(typeLiteral.type, el => this.visitType(el, q))
|
|
979
|
+
};
|
|
980
|
+
return (0, util_1.updateIfChanged)(typeLiteral, updates);
|
|
981
|
+
}
|
|
982
|
+
async visitArrayBindingPattern(arrayBindingPattern, q) {
|
|
983
|
+
const updates = {
|
|
984
|
+
elements: await q.receive(arrayBindingPattern.elements, el => this.visitContainer(el, q)),
|
|
985
|
+
type: await q.receive(arrayBindingPattern.type, el => this.visitType(el, q))
|
|
986
|
+
};
|
|
987
|
+
return (0, util_1.updateIfChanged)(arrayBindingPattern, updates);
|
|
988
|
+
}
|
|
989
|
+
async visitBindingElement(bindingElement, q) {
|
|
990
|
+
const updates = {
|
|
991
|
+
propertyName: await q.receive(bindingElement.propertyName, el => this.visitRightPadded(el, q)),
|
|
992
|
+
name: await q.receive(bindingElement.name, el => this.visitDefined(el, q)),
|
|
993
|
+
initializer: await q.receive(bindingElement.initializer, el => this.visitLeftPadded(el, q)),
|
|
994
|
+
variableType: await q.receive(bindingElement.variableType, el => this.visitType(el, q))
|
|
995
|
+
};
|
|
996
|
+
return (0, util_1.updateIfChanged)(bindingElement, updates);
|
|
997
|
+
}
|
|
998
|
+
async visitExportDeclaration(exportDeclaration, q) {
|
|
999
|
+
const updates = {
|
|
1000
|
+
modifiers: await q.receiveListDefined(exportDeclaration.modifiers, el => this.visitDefined(el, q)),
|
|
1001
|
+
typeOnly: await q.receive(exportDeclaration.typeOnly, el => this.visitLeftPadded(el, q)),
|
|
1002
|
+
exportClause: await q.receive(exportDeclaration.exportClause, el => this.visitDefined(el, q)),
|
|
1003
|
+
moduleSpecifier: await q.receive(exportDeclaration.moduleSpecifier, el => this.visitLeftPadded(el, q)),
|
|
1004
|
+
attributes: await q.receive(exportDeclaration.attributes, el => this.visitDefined(el, q))
|
|
1005
|
+
};
|
|
1006
|
+
return (0, util_1.updateIfChanged)(exportDeclaration, updates);
|
|
1007
|
+
}
|
|
1008
|
+
async visitExportAssignment(exportAssignment, q) {
|
|
1009
|
+
const updates = {
|
|
1010
|
+
exportEquals: await q.receive(exportAssignment.exportEquals),
|
|
1011
|
+
expression: await q.receive(exportAssignment.expression, el => this.visitLeftPadded(el, q))
|
|
1012
|
+
};
|
|
1013
|
+
return (0, util_1.updateIfChanged)(exportAssignment, updates);
|
|
1014
|
+
}
|
|
1015
|
+
async visitNamedExports(namedExports, q) {
|
|
1016
|
+
const updates = {
|
|
1017
|
+
elements: await q.receive(namedExports.elements, el => this.visitContainer(el, q)),
|
|
1018
|
+
type: await q.receive(namedExports.type, el => this.visitType(el, q))
|
|
1019
|
+
};
|
|
1020
|
+
return (0, util_1.updateIfChanged)(namedExports, updates);
|
|
1021
|
+
}
|
|
1022
|
+
async visitExportSpecifier(exportSpecifier, q) {
|
|
1023
|
+
const updates = {
|
|
1024
|
+
typeOnly: await q.receive(exportSpecifier.typeOnly, el => this.visitLeftPadded(el, q)),
|
|
1025
|
+
specifier: await q.receive(exportSpecifier.specifier, el => this.visitDefined(el, q)),
|
|
1026
|
+
type: await q.receive(exportSpecifier.type, el => this.visitType(el, q))
|
|
1027
|
+
};
|
|
1028
|
+
return (0, util_1.updateIfChanged)(exportSpecifier, updates);
|
|
1029
|
+
}
|
|
1030
|
+
async visitRightPadded(right, q) {
|
|
1031
|
+
return this.delegate.visitRightPadded(right, q);
|
|
1032
|
+
}
|
|
1033
|
+
async visitLeftPadded(left, q) {
|
|
1034
|
+
return this.delegate.visitLeftPadded(left, q);
|
|
1035
|
+
}
|
|
1036
|
+
async visitContainer(container, q) {
|
|
1037
|
+
return this.delegate.visitContainer(container, q);
|
|
1038
|
+
}
|
|
1039
|
+
async visitSpace(space, q) {
|
|
1040
|
+
return this.delegate.visitSpace(space, q);
|
|
1041
|
+
}
|
|
1042
|
+
async visitType(javaType, q) {
|
|
1043
|
+
return this.delegate.visitType(javaType, q);
|
|
1364
1044
|
}
|
|
1365
1045
|
}
|
|
1366
1046
|
class JavaScriptDelegateReceiver extends rpc_2.JavaReceiver {
|
|
@@ -1368,16 +1048,11 @@ class JavaScriptDelegateReceiver extends rpc_2.JavaReceiver {
|
|
|
1368
1048
|
super();
|
|
1369
1049
|
this.javascriptReceiver = javascriptReceiver;
|
|
1370
1050
|
}
|
|
1371
|
-
visit(tree, p, parent) {
|
|
1372
|
-
|
|
1373
|
-
visit
|
|
1374
|
-
}
|
|
1375
|
-
return
|
|
1376
|
-
if ((0, tree_1.isJavaScript)(tree)) {
|
|
1377
|
-
return this.javascriptReceiver.visit(tree, p, parent);
|
|
1378
|
-
}
|
|
1379
|
-
return _super.visit.call(this, tree, p, parent);
|
|
1380
|
-
});
|
|
1051
|
+
async visit(tree, p, parent) {
|
|
1052
|
+
if ((0, tree_1.isJavaScript)(tree)) {
|
|
1053
|
+
return this.javascriptReceiver.visit(tree, p, parent);
|
|
1054
|
+
}
|
|
1055
|
+
return super.visit(tree, p, parent);
|
|
1381
1056
|
}
|
|
1382
1057
|
}
|
|
1383
1058
|
(0, rpc_2.registerJLanguageCodecs)(tree_1.JS.Kind.CompilationUnit, new JavaScriptReceiver(), new JavaScriptSender(), tree_1.JS.Kind);
|