@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.
Files changed (197) hide show
  1. package/dist/execution.js +3 -16
  2. package/dist/execution.js.map +1 -1
  3. package/dist/index.js +34 -49
  4. package/dist/index.js.map +1 -1
  5. package/dist/java/markers.js +12 -29
  6. package/dist/java/markers.js.map +1 -1
  7. package/dist/java/print.js +2 -13
  8. package/dist/java/print.js.map +1 -1
  9. package/dist/java/rpc.js +1344 -1725
  10. package/dist/java/rpc.js.map +1 -1
  11. package/dist/java/type-visitor.js +143 -184
  12. package/dist/java/type-visitor.js.map +1 -1
  13. package/dist/java/visitor.js +1072 -1249
  14. package/dist/java/visitor.js.map +1 -1
  15. package/dist/javascript/add-import.js +495 -534
  16. package/dist/javascript/add-import.js.map +1 -1
  17. package/dist/javascript/autodetect.js +116 -159
  18. package/dist/javascript/autodetect.js.map +1 -1
  19. package/dist/javascript/cleanup/add-parse-int-radix.js +41 -57
  20. package/dist/javascript/cleanup/add-parse-int-radix.js.map +1 -1
  21. package/dist/javascript/cleanup/prefer-optional-chain.js +89 -105
  22. package/dist/javascript/cleanup/prefer-optional-chain.js.map +1 -1
  23. package/dist/javascript/cleanup/use-object-property-shorthand.js +74 -95
  24. package/dist/javascript/cleanup/use-object-property-shorthand.js.map +1 -1
  25. package/dist/javascript/comparator.js +815 -1167
  26. package/dist/javascript/comparator.js.map +1 -1
  27. package/dist/javascript/dependency-workspace.js +206 -219
  28. package/dist/javascript/dependency-workspace.js.map +1 -1
  29. package/dist/javascript/format/format.js +682 -908
  30. package/dist/javascript/format/format.js.map +1 -1
  31. package/dist/javascript/format/minimum-viable-spacing-visitor.js +152 -231
  32. package/dist/javascript/format/minimum-viable-spacing-visitor.js.map +1 -1
  33. package/dist/javascript/format/normalize-whitespace-visitor.js +12 -31
  34. package/dist/javascript/format/normalize-whitespace-visitor.js.map +1 -1
  35. package/dist/javascript/format/prettier-config-loader.js +134 -153
  36. package/dist/javascript/format/prettier-config-loader.js.map +1 -1
  37. package/dist/javascript/format/prettier-format.js +112 -129
  38. package/dist/javascript/format/prettier-format.js.map +1 -1
  39. package/dist/javascript/format/tabs-and-indents-visitor.js +112 -136
  40. package/dist/javascript/format/tabs-and-indents-visitor.js.map +1 -1
  41. package/dist/javascript/markers.js +59 -92
  42. package/dist/javascript/markers.js.map +1 -1
  43. package/dist/javascript/migrate/es6/modernize-octal-escape-sequences.js +39 -52
  44. package/dist/javascript/migrate/es6/modernize-octal-escape-sequences.js.map +1 -1
  45. package/dist/javascript/migrate/es6/modernize-octal-literals.js +25 -38
  46. package/dist/javascript/migrate/es6/modernize-octal-literals.js.map +1 -1
  47. package/dist/javascript/migrate/es6/remove-duplicate-object-keys.js +66 -82
  48. package/dist/javascript/migrate/es6/remove-duplicate-object-keys.js.map +1 -1
  49. package/dist/javascript/migrate/typescript/export-assignment-to-export-default.js +10 -23
  50. package/dist/javascript/migrate/typescript/export-assignment-to-export-default.js.map +1 -1
  51. package/dist/javascript/node-resolution-result.js +137 -166
  52. package/dist/javascript/node-resolution-result.js.map +1 -1
  53. package/dist/javascript/package-json-parser.js +312 -343
  54. package/dist/javascript/package-json-parser.js.map +1 -1
  55. package/dist/javascript/package-manager.js +145 -170
  56. package/dist/javascript/package-manager.js.map +1 -1
  57. package/dist/javascript/parser.d.ts.map +1 -1
  58. package/dist/javascript/parser.js +94 -68
  59. package/dist/javascript/parser.js.map +1 -1
  60. package/dist/javascript/print.js +1572 -1835
  61. package/dist/javascript/print.js.map +1 -1
  62. package/dist/javascript/project-parser.js +151 -172
  63. package/dist/javascript/project-parser.js.map +1 -1
  64. package/dist/javascript/recipes/add-dependency.js +140 -175
  65. package/dist/javascript/recipes/add-dependency.js.map +1 -1
  66. package/dist/javascript/recipes/async-callback-in-sync-array-method.js +20 -36
  67. package/dist/javascript/recipes/async-callback-in-sync-array-method.js.map +1 -1
  68. package/dist/javascript/recipes/auto-format.js +3 -14
  69. package/dist/javascript/recipes/auto-format.js.map +1 -1
  70. package/dist/javascript/recipes/change-import.js +447 -495
  71. package/dist/javascript/recipes/change-import.js.map +1 -1
  72. package/dist/javascript/recipes/order-imports.js +162 -175
  73. package/dist/javascript/recipes/order-imports.js.map +1 -1
  74. package/dist/javascript/recipes/upgrade-dependency-version.js +167 -197
  75. package/dist/javascript/recipes/upgrade-dependency-version.js.map +1 -1
  76. package/dist/javascript/recipes/upgrade-transitive-dependency-version.js +166 -193
  77. package/dist/javascript/recipes/upgrade-transitive-dependency-version.js.map +1 -1
  78. package/dist/javascript/remove-import.js +689 -724
  79. package/dist/javascript/remove-import.js.map +1 -1
  80. package/dist/javascript/rpc.js +1007 -1332
  81. package/dist/javascript/rpc.js.map +1 -1
  82. package/dist/javascript/search/find-dependency.js +84 -110
  83. package/dist/javascript/search/find-dependency.js.map +1 -1
  84. package/dist/javascript/search/uses-method.js +5 -19
  85. package/dist/javascript/search/uses-method.js.map +1 -1
  86. package/dist/javascript/search/uses-type.js +9 -20
  87. package/dist/javascript/search/uses-type.js.map +1 -1
  88. package/dist/javascript/templating/comparator.js +737 -822
  89. package/dist/javascript/templating/comparator.js.map +1 -1
  90. package/dist/javascript/templating/engine.js +211 -245
  91. package/dist/javascript/templating/engine.js.map +1 -1
  92. package/dist/javascript/templating/pattern.js +169 -190
  93. package/dist/javascript/templating/pattern.js.map +1 -1
  94. package/dist/javascript/templating/placeholder-replacement.js +172 -210
  95. package/dist/javascript/templating/placeholder-replacement.js.map +1 -1
  96. package/dist/javascript/templating/rewrite.js +75 -97
  97. package/dist/javascript/templating/rewrite.js.map +1 -1
  98. package/dist/javascript/templating/template.js +69 -82
  99. package/dist/javascript/templating/template.js.map +1 -1
  100. package/dist/javascript/tree-debug.js +109 -137
  101. package/dist/javascript/tree-debug.js.map +1 -1
  102. package/dist/javascript/visitor.js +1090 -1254
  103. package/dist/javascript/visitor.js.map +1 -1
  104. package/dist/json/print.js +72 -103
  105. package/dist/json/print.js.map +1 -1
  106. package/dist/json/rpc.js +120 -181
  107. package/dist/json/rpc.js.map +1 -1
  108. package/dist/json/visitor.js +69 -100
  109. package/dist/json/visitor.js.map +1 -1
  110. package/dist/marketplace.js +20 -33
  111. package/dist/marketplace.js.map +1 -1
  112. package/dist/parse-error.js +41 -62
  113. package/dist/parse-error.js.map +1 -1
  114. package/dist/parser.js +7 -18
  115. package/dist/parser.js.map +1 -1
  116. package/dist/path-utils.js +46 -59
  117. package/dist/path-utils.js.map +1 -1
  118. package/dist/preconditions.js +30 -47
  119. package/dist/preconditions.js.map +1 -1
  120. package/dist/print.js +6 -19
  121. package/dist/print.js.map +1 -1
  122. package/dist/recipe.js +42 -73
  123. package/dist/recipe.js.map +1 -1
  124. package/dist/rpc/index.js +74 -115
  125. package/dist/rpc/index.js.map +1 -1
  126. package/dist/rpc/queue.js +71 -90
  127. package/dist/rpc/queue.js.map +1 -1
  128. package/dist/rpc/recipe.js +32 -57
  129. package/dist/rpc/recipe.js.map +1 -1
  130. package/dist/rpc/request/generate.js +4 -13
  131. package/dist/rpc/request/generate.js.map +1 -1
  132. package/dist/rpc/request/get-languages.js +2 -11
  133. package/dist/rpc/request/get-languages.js.map +1 -1
  134. package/dist/rpc/request/get-marketplace.js +9 -20
  135. package/dist/rpc/request/get-marketplace.js.map +1 -1
  136. package/dist/rpc/request/get-object.js +4 -13
  137. package/dist/rpc/request/get-object.js.map +1 -1
  138. package/dist/rpc/request/install-recipes.js +25 -36
  139. package/dist/rpc/request/install-recipes.js.map +1 -1
  140. package/dist/rpc/request/metrics.js +8 -17
  141. package/dist/rpc/request/metrics.js.map +1 -1
  142. package/dist/rpc/request/parse-project.js +36 -45
  143. package/dist/rpc/request/parse-project.js.map +1 -1
  144. package/dist/rpc/request/parse.js +5 -14
  145. package/dist/rpc/request/parse.js.map +1 -1
  146. package/dist/rpc/request/prepare-recipe.js +37 -52
  147. package/dist/rpc/request/prepare-recipe.js.map +1 -1
  148. package/dist/rpc/request/print.js +5 -14
  149. package/dist/rpc/request/print.js.map +1 -1
  150. package/dist/rpc/request/visit.js +56 -71
  151. package/dist/rpc/request/visit.js.map +1 -1
  152. package/dist/rpc/rewrite-rpc.js +70 -97
  153. package/dist/rpc/rewrite-rpc.js.map +1 -1
  154. package/dist/rpc/server.js +76 -89
  155. package/dist/rpc/server.js.map +1 -1
  156. package/dist/run.js +47 -66
  157. package/dist/run.js.map +1 -1
  158. package/dist/search/is-source-file.js +8 -19
  159. package/dist/search/is-source-file.js.map +1 -1
  160. package/dist/test/rewrite-test.js +154 -188
  161. package/dist/test/rewrite-test.js.map +1 -1
  162. package/dist/text/print.js +23 -38
  163. package/dist/text/print.js.map +1 -1
  164. package/dist/text/rpc.js +29 -44
  165. package/dist/text/rpc.js.map +1 -1
  166. package/dist/text/visitor.js +16 -33
  167. package/dist/text/visitor.js.map +1 -1
  168. package/dist/util.js +13 -24
  169. package/dist/util.js.map +1 -1
  170. package/dist/version.txt +1 -1
  171. package/dist/visitor.js +84 -115
  172. package/dist/visitor.js.map +1 -1
  173. package/dist/yaml/index.d.ts +2 -0
  174. package/dist/yaml/index.d.ts.map +1 -1
  175. package/dist/yaml/index.js +2 -0
  176. package/dist/yaml/index.js.map +1 -1
  177. package/dist/yaml/markers.d.ts +21 -0
  178. package/dist/yaml/markers.d.ts.map +1 -0
  179. package/dist/yaml/markers.js +37 -0
  180. package/dist/yaml/markers.js.map +1 -0
  181. package/dist/yaml/parser.d.ts.map +1 -1
  182. package/dist/yaml/parser.js +4 -1
  183. package/dist/yaml/parser.js.map +1 -1
  184. package/dist/yaml/print.d.ts +1 -1
  185. package/dist/yaml/print.d.ts.map +1 -1
  186. package/dist/yaml/print.js +175 -208
  187. package/dist/yaml/print.js.map +1 -1
  188. package/dist/yaml/rpc.js +154 -219
  189. package/dist/yaml/rpc.js.map +1 -1
  190. package/dist/yaml/visitor.js +78 -113
  191. package/dist/yaml/visitor.js.map +1 -1
  192. package/package.json +1 -1
  193. package/src/javascript/parser.ts +56 -14
  194. package/src/yaml/index.ts +2 -0
  195. package/src/yaml/markers.ts +70 -0
  196. package/src/yaml/parser.ts +5 -1
  197. package/src/yaml/print.ts +5 -2
@@ -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
- const _super = Object.create(null, {
39
- visit: { get: () => super.visit }
40
- });
41
- return __awaiter(this, void 0, void 0, function* () {
42
- if ((0, tree_1.isJavaScript)(tree)) {
43
- return _super.visit.call(this, tree, p, parent);
44
- }
45
- return this.delegate.visit(tree, p, parent);
46
- });
47
- }
48
- preVisit(j, q) {
49
- return __awaiter(this, void 0, void 0, function* () {
50
- yield q.getAndSend(j, j2 => j2.id);
51
- yield q.getAndSend(j, j2 => j2.prefix, space => this.visitSpace(space, q));
52
- yield q.getAndSend(j, j2 => j2.markers);
53
- return j;
54
- });
55
- }
56
- visitJsCompilationUnit(cu, q) {
57
- return __awaiter(this, void 0, void 0, function* () {
58
- yield q.getAndSend(cu, c => c.sourcePath);
59
- yield q.getAndSend(cu, c => c.charsetName);
60
- yield q.getAndSend(cu, c => c.charsetBomMarked);
61
- yield q.getAndSend(cu, c => c.checksum);
62
- yield q.getAndSend(cu, c => c.fileAttributes);
63
- yield q.getAndSendList(cu, c => c.statements, stmt => stmt.element.id, stmt => this.visitRightPadded(stmt, q));
64
- yield q.getAndSend(cu, c => c.eof, space => this.visitSpace(space, q));
65
- return cu;
66
- });
67
- }
68
- visitAlias(alias, q) {
69
- return __awaiter(this, void 0, void 0, function* () {
70
- yield q.getAndSend(alias, el => el.propertyName, el => this.visitRightPadded(el, q));
71
- yield q.getAndSend(alias, el => el.alias, el => this.visit(el, q));
72
- return alias;
73
- });
74
- }
75
- visitArrowFunction(arrowFunction, q) {
76
- return __awaiter(this, void 0, void 0, function* () {
77
- yield q.getAndSendList(arrowFunction, el => el.leadingAnnotations, el => el.id, el => this.visit(el, q));
78
- yield q.getAndSendList(arrowFunction, el => el.modifiers, el => el.id, el => this.visit(el, q));
79
- yield q.getAndSend(arrowFunction, el => el.typeParameters, el => this.visit(el, q));
80
- yield q.getAndSend(arrowFunction, el => el.lambda, el => this.visit(el, q));
81
- yield q.getAndSend(arrowFunction, el => el.returnTypeExpression, el => this.visit(el, q));
82
- return arrowFunction;
83
- });
84
- }
85
- visitAwait(await_, q) {
86
- return __awaiter(this, void 0, void 0, function* () {
87
- yield q.getAndSend(await_, el => el.expression, el => this.visit(el, q));
88
- yield q.getAndSend(await_, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
89
- return await_;
90
- });
91
- }
92
- visitConditionalType(conditionalType, q) {
93
- return __awaiter(this, void 0, void 0, function* () {
94
- yield q.getAndSend(conditionalType, el => el.checkType, el => this.visit(el, q));
95
- yield q.getAndSend(conditionalType, el => el.condition, el => this.visitLeftPadded(el, q));
96
- yield q.getAndSend(conditionalType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
97
- return conditionalType;
98
- });
99
- }
100
- visitDelete(delete_, q) {
101
- return __awaiter(this, void 0, void 0, function* () {
102
- yield q.getAndSend(delete_, el => el.expression, el => this.visit(el, q));
103
- return delete_;
104
- });
105
- }
106
- visitExpressionStatement(expressionStatement, q) {
107
- return __awaiter(this, void 0, void 0, function* () {
108
- yield q.getAndSend(expressionStatement, el => el.expression, el => this.visit(el, q));
109
- return expressionStatement;
110
- });
111
- }
112
- visitExpressionWithTypeArguments(expressionWithTypeArguments, q) {
113
- return __awaiter(this, void 0, void 0, function* () {
114
- yield q.getAndSend(expressionWithTypeArguments, el => el.clazz, el => this.visit(el, q));
115
- yield q.getAndSend(expressionWithTypeArguments, el => el.typeArguments, el => this.visitContainer(el, q));
116
- yield q.getAndSend(expressionWithTypeArguments, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
117
- return expressionWithTypeArguments;
118
- });
119
- }
120
- visitFunctionCall(functionCall, q) {
121
- return __awaiter(this, void 0, void 0, function* () {
122
- yield q.getAndSend(functionCall, m => m.function, f => this.visitRightPadded(f, q));
123
- yield q.getAndSend(functionCall, m => m.typeParameters, params => this.visitContainer(params, q));
124
- yield q.getAndSend(functionCall, m => m.arguments, args => this.visitContainer(args, q));
125
- yield q.getAndSend(functionCall, m => (0, rpc_1.asRef)(m.methodType), type => this.visitType(type, q));
126
- return functionCall;
127
- });
128
- }
129
- visitFunctionType(functionType, q) {
130
- return __awaiter(this, void 0, void 0, function* () {
131
- yield q.getAndSendList(functionType, el => el.modifiers, el => el.id, el => this.visit(el, q));
132
- yield q.getAndSend(functionType, el => el.constructorType, el => this.visitLeftPadded(el, q));
133
- yield q.getAndSend(functionType, el => el.typeParameters, el => this.visit(el, q));
134
- yield q.getAndSend(functionType, el => el.parameters, el => this.visitContainer(el, q));
135
- yield q.getAndSend(functionType, el => el.returnType, el => this.visitLeftPadded(el, q));
136
- return functionType;
137
- });
138
- }
139
- visitInferType(inferType, q) {
140
- return __awaiter(this, void 0, void 0, function* () {
141
- yield q.getAndSend(inferType, el => el.typeParameter, el => this.visitLeftPadded(el, q));
142
- yield q.getAndSend(inferType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
143
- return inferType;
144
- });
145
- }
146
- visitImportType(importType, q) {
147
- return __awaiter(this, void 0, void 0, function* () {
148
- yield q.getAndSend(importType, el => el.hasTypeof, el => this.visitRightPadded(el, q));
149
- yield q.getAndSend(importType, el => el.argumentAndAttributes, el => this.visitContainer(el, q));
150
- yield q.getAndSend(importType, el => el.qualifier, el => this.visitLeftPadded(el, q));
151
- yield q.getAndSend(importType, el => el.typeArguments, el => this.visitContainer(el, q));
152
- yield q.getAndSend(importType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
153
- return importType;
154
- });
155
- }
156
- visitImportDeclaration(jsImport, q) {
157
- return __awaiter(this, void 0, void 0, function* () {
158
- yield q.getAndSendList(jsImport, el => el.modifiers, el => el.id, el => this.visit(el, q));
159
- yield q.getAndSend(jsImport, el => el.importClause, el => this.visit(el, q));
160
- yield q.getAndSend(jsImport, el => el.moduleSpecifier, el => this.visitLeftPadded(el, q));
161
- yield q.getAndSend(jsImport, el => el.attributes, el => this.visit(el, q));
162
- yield q.getAndSend(jsImport, el => el.initializer, el => this.visitLeftPadded(el, q));
163
- return jsImport;
164
- });
165
- }
166
- visitImportClause(jsImportClause, q) {
167
- return __awaiter(this, void 0, void 0, function* () {
168
- yield q.getAndSend(jsImportClause, el => el.typeOnly);
169
- yield q.getAndSend(jsImportClause, el => el.name, el => this.visitRightPadded(el, q));
170
- yield q.getAndSend(jsImportClause, el => el.namedBindings, el => this.visit(el, q));
171
- return jsImportClause;
172
- });
173
- }
174
- visitNamedImports(namedImports, q) {
175
- return __awaiter(this, void 0, void 0, function* () {
176
- yield q.getAndSend(namedImports, el => el.elements, el => this.visitContainer(el, q));
177
- yield q.getAndSend(namedImports, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
178
- return namedImports;
179
- });
180
- }
181
- visitImportSpecifier(jsImportSpecifier, q) {
182
- return __awaiter(this, void 0, void 0, function* () {
183
- yield q.getAndSend(jsImportSpecifier, el => el.importType, el => this.visitLeftPadded(el, q));
184
- yield q.getAndSend(jsImportSpecifier, el => el.specifier, el => this.visit(el, q));
185
- yield q.getAndSend(jsImportSpecifier, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
186
- return jsImportSpecifier;
187
- });
188
- }
189
- visitImportAttributes(importAttributes, q) {
190
- return __awaiter(this, void 0, void 0, function* () {
191
- yield q.getAndSend(importAttributes, el => el.token);
192
- yield q.getAndSend(importAttributes, el => el.elements, el => this.visitContainer(el, q));
193
- return importAttributes;
194
- });
195
- }
196
- visitImportTypeAttributes(importTypeAttributes, q) {
197
- return __awaiter(this, void 0, void 0, function* () {
198
- yield q.getAndSend(importTypeAttributes, el => el.token, el => this.visitRightPadded(el, q));
199
- yield q.getAndSend(importTypeAttributes, el => el.elements, el => this.visitContainer(el, q));
200
- yield q.getAndSend(importTypeAttributes, el => el.end, el => this.visitSpace(el, q));
201
- return importTypeAttributes;
202
- });
203
- }
204
- visitImportAttribute(importAttribute, q) {
205
- return __awaiter(this, void 0, void 0, function* () {
206
- yield q.getAndSend(importAttribute, el => el.name, el => this.visit(el, q));
207
- yield q.getAndSend(importAttribute, el => el.value, el => this.visitLeftPadded(el, q));
208
- return importAttribute;
209
- });
210
- }
211
- visitBinaryExtensions(binary, q) {
212
- return __awaiter(this, void 0, void 0, function* () {
213
- yield q.getAndSend(binary, el => el.left, el => this.visit(el, q));
214
- yield q.getAndSend(binary, el => el.operator, el => this.visitLeftPadded(el, q));
215
- yield q.getAndSend(binary, el => el.right, el => this.visit(el, q));
216
- yield q.getAndSend(binary, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
217
- return binary;
218
- });
219
- }
220
- visitLiteralType(literalType, q) {
221
- return __awaiter(this, void 0, void 0, function* () {
222
- yield q.getAndSend(literalType, el => el.literal, el => this.visit(el, q));
223
- yield q.getAndSend(literalType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
224
- return literalType;
225
- });
226
- }
227
- visitMappedType(mappedType, q) {
228
- return __awaiter(this, void 0, void 0, function* () {
229
- yield q.getAndSend(mappedType, el => el.prefixToken, el => this.visitLeftPadded(el, q));
230
- yield q.getAndSend(mappedType, el => el.hasReadonly, el => this.visitLeftPadded(el, q));
231
- yield q.getAndSend(mappedType, el => el.keysRemapping, el => this.visit(el, q));
232
- yield q.getAndSend(mappedType, el => el.suffixToken, el => this.visitLeftPadded(el, q));
233
- yield q.getAndSend(mappedType, el => el.hasQuestionToken, el => this.visitLeftPadded(el, q));
234
- yield q.getAndSend(mappedType, el => el.valueType, el => this.visitContainer(el, q));
235
- yield q.getAndSend(mappedType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
236
- return mappedType;
237
- });
238
- }
239
- visitMappedTypeKeysRemapping(keysRemapping, q) {
240
- return __awaiter(this, void 0, void 0, function* () {
241
- yield q.getAndSend(keysRemapping, el => el.typeParameter, el => this.visitRightPadded(el, q));
242
- yield q.getAndSend(keysRemapping, el => el.nameType, el => this.visitRightPadded(el, q));
243
- return keysRemapping;
244
- });
245
- }
246
- visitMappedTypeParameter(mappedTypeParameter, q) {
247
- return __awaiter(this, void 0, void 0, function* () {
248
- yield q.getAndSend(mappedTypeParameter, el => el.name, el => this.visit(el, q));
249
- yield q.getAndSend(mappedTypeParameter, el => el.iterateType, el => this.visitLeftPadded(el, q));
250
- return mappedTypeParameter;
251
- });
252
- }
253
- visitObjectBindingPattern(objectBindingPattern, q) {
254
- return __awaiter(this, void 0, void 0, function* () {
255
- yield q.getAndSendList(objectBindingPattern, el => el.leadingAnnotations, el => el.id, el => this.visit(el, q));
256
- yield q.getAndSendList(objectBindingPattern, el => el.modifiers, el => el.id, el => this.visit(el, q));
257
- yield q.getAndSend(objectBindingPattern, el => el.typeExpression, el => this.visit(el, q));
258
- yield q.getAndSend(objectBindingPattern, el => el.bindings, el => this.visitContainer(el, q));
259
- yield q.getAndSend(objectBindingPattern, el => el.initializer, el => this.visitLeftPadded(el, q));
260
- return objectBindingPattern;
261
- });
262
- }
263
- visitPropertyAssignment(propertyAssignment, q) {
264
- return __awaiter(this, void 0, void 0, function* () {
265
- yield q.getAndSend(propertyAssignment, el => el.name, el => this.visitRightPadded(el, q));
266
- yield q.getAndSend(propertyAssignment, el => el.assigmentToken);
267
- yield q.getAndSend(propertyAssignment, el => el.initializer, el => this.visit(el, q));
268
- return propertyAssignment;
269
- });
270
- }
271
- visitSatisfiesExpression(satisfiesExpression, q) {
272
- return __awaiter(this, void 0, void 0, function* () {
273
- yield q.getAndSend(satisfiesExpression, el => el.expression, el => this.visit(el, q));
274
- yield q.getAndSend(satisfiesExpression, el => el.satisfiesType, el => this.visitLeftPadded(el, q));
275
- yield q.getAndSend(satisfiesExpression, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
276
- return satisfiesExpression;
277
- });
278
- }
279
- visitScopedVariableDeclarations(scopedVariableDeclarations, q) {
280
- return __awaiter(this, void 0, void 0, function* () {
281
- yield q.getAndSendList(scopedVariableDeclarations, el => el.modifiers, el => el.id, el => this.visit(el, q));
282
- yield q.getAndSendList(scopedVariableDeclarations, el => el.variables, el => el.element.id, el => this.visitRightPadded(el, q));
283
- return scopedVariableDeclarations;
284
- });
285
- }
286
- visitShebang(shebang, q) {
287
- return __awaiter(this, void 0, void 0, function* () {
288
- yield q.getAndSend(shebang, el => el.text);
289
- return shebang;
290
- });
291
- }
292
- visitSpread(spread, q) {
293
- return __awaiter(this, void 0, void 0, function* () {
294
- yield q.getAndSend(spread, el => el.expression, el => this.visit(el, q));
295
- yield q.getAndSend(spread, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
296
- return spread;
297
- });
298
- }
299
- visitStatementExpression(statementExpression, q) {
300
- return __awaiter(this, void 0, void 0, function* () {
301
- yield q.getAndSend(statementExpression, el => el.statement, el => this.visit(el, q));
302
- return statementExpression;
303
- });
304
- }
305
- visitTaggedTemplateExpression(taggedTemplateExpression, q) {
306
- return __awaiter(this, void 0, void 0, function* () {
307
- yield q.getAndSend(taggedTemplateExpression, el => el.tag, el => this.visitRightPadded(el, q));
308
- yield q.getAndSend(taggedTemplateExpression, el => el.typeArguments, el => this.visitContainer(el, q));
309
- yield q.getAndSend(taggedTemplateExpression, el => el.templateExpression, el => this.visit(el, q));
310
- yield q.getAndSend(taggedTemplateExpression, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
311
- return taggedTemplateExpression;
312
- });
313
- }
314
- visitTemplateExpression(templateExpression, q) {
315
- return __awaiter(this, void 0, void 0, function* () {
316
- yield q.getAndSend(templateExpression, el => el.head, el => this.visit(el, q));
317
- yield q.getAndSendList(templateExpression, el => el.spans, el => el.element.id, el => this.visitRightPadded(el, q));
318
- yield q.getAndSend(templateExpression, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
319
- return templateExpression;
320
- });
321
- }
322
- visitTemplateExpressionSpan(span, q) {
323
- return __awaiter(this, void 0, void 0, function* () {
324
- yield q.getAndSend(span, el => el.expression, el => this.visit(el, q));
325
- yield q.getAndSend(span, el => el.tail, el => this.visit(el, q));
326
- return span;
327
- });
328
- }
329
- visitTuple(tuple, q) {
330
- return __awaiter(this, void 0, void 0, function* () {
331
- yield q.getAndSend(tuple, el => el.elements, el => this.visitContainer(el, q));
332
- yield q.getAndSend(tuple, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
333
- return tuple;
334
- });
335
- }
336
- visitTypeDeclaration(typeDeclaration, q) {
337
- return __awaiter(this, void 0, void 0, function* () {
338
- yield q.getAndSendList(typeDeclaration, el => el.modifiers, el => el.id, el => this.visit(el, q));
339
- yield q.getAndSend(typeDeclaration, el => el.name, el => this.visitLeftPadded(el, q));
340
- yield q.getAndSend(typeDeclaration, el => el.typeParameters, el => this.visit(el, q));
341
- yield q.getAndSend(typeDeclaration, el => el.initializer, el => this.visitLeftPadded(el, q));
342
- yield q.getAndSend(typeDeclaration, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
343
- return typeDeclaration;
344
- });
345
- }
346
- visitTypeOf(typeOf, q) {
347
- return __awaiter(this, void 0, void 0, function* () {
348
- yield q.getAndSend(typeOf, el => el.expression, el => this.visit(el, q));
349
- yield q.getAndSend(typeOf, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
350
- return typeOf;
351
- });
352
- }
353
- visitTypeTreeExpression(typeTreeExpression, q) {
354
- return __awaiter(this, void 0, void 0, function* () {
355
- yield q.getAndSend(typeTreeExpression, el => el.expression, el => this.visit(el, q));
356
- return typeTreeExpression;
357
- });
358
- }
359
- visitAs(as_, q) {
360
- return __awaiter(this, void 0, void 0, function* () {
361
- yield q.getAndSend(as_, el => el.left, el => this.visitRightPadded(el, q));
362
- yield q.getAndSend(as_, el => el.right, el => this.visit(el, q));
363
- yield q.getAndSend(as_, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
364
- return as_;
365
- });
366
- }
367
- visitAssignmentOperationExtensions(assignmentOperation, q) {
368
- return __awaiter(this, void 0, void 0, function* () {
369
- yield q.getAndSend(assignmentOperation, el => el.variable, el => this.visit(el, q));
370
- yield q.getAndSend(assignmentOperation, el => el.operator, el => this.visitLeftPadded(el, q));
371
- yield q.getAndSend(assignmentOperation, el => el.assignment, el => this.visit(el, q));
372
- yield q.getAndSend(assignmentOperation, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
373
- return assignmentOperation;
374
- });
375
- }
376
- visitIndexedAccessType(indexedAccessType, q) {
377
- return __awaiter(this, void 0, void 0, function* () {
378
- yield q.getAndSend(indexedAccessType, el => el.objectType, el => this.visit(el, q));
379
- yield q.getAndSend(indexedAccessType, el => el.indexType, el => this.visit(el, q));
380
- yield q.getAndSend(indexedAccessType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
381
- return indexedAccessType;
382
- });
383
- }
384
- visitIndexedAccessTypeIndexType(indexType, q) {
385
- return __awaiter(this, void 0, void 0, function* () {
386
- yield q.getAndSend(indexType, el => el.element, el => this.visitRightPadded(el, q));
387
- yield q.getAndSend(indexType, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
388
- return indexType;
389
- });
390
- }
391
- visitTypeQuery(typeQuery, q) {
392
- return __awaiter(this, void 0, void 0, function* () {
393
- yield q.getAndSend(typeQuery, el => el.typeExpression, el => this.visit(el, q));
394
- yield q.getAndSend(typeQuery, el => el.typeArguments, el => this.visitContainer(el, q));
395
- yield q.getAndSend(typeQuery, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
396
- return typeQuery;
397
- });
398
- }
399
- visitTypeInfo(typeInfo, q) {
400
- return __awaiter(this, void 0, void 0, function* () {
401
- yield q.getAndSend(typeInfo, el => el.typeIdentifier, el => this.visit(el, q));
402
- return typeInfo;
403
- });
404
- }
405
- visitComputedPropertyName(computedPropertyName, q) {
406
- return __awaiter(this, void 0, void 0, function* () {
407
- yield q.getAndSend(computedPropertyName, el => el.expression, el => this.visitRightPadded(el, q));
408
- return computedPropertyName;
409
- });
410
- }
411
- visitTypeOperator(typeOperator, q) {
412
- return __awaiter(this, void 0, void 0, function* () {
413
- yield q.getAndSend(typeOperator, el => el.operator);
414
- yield q.getAndSend(typeOperator, el => el.expression, el => this.visitLeftPadded(el, q));
415
- return typeOperator;
416
- });
417
- }
418
- visitTypePredicate(typePredicate, q) {
419
- return __awaiter(this, void 0, void 0, function* () {
420
- yield q.getAndSend(typePredicate, el => el.asserts, el => this.visitLeftPadded(el, q));
421
- yield q.getAndSend(typePredicate, el => el.parameterName, el => this.visit(el, q));
422
- yield q.getAndSend(typePredicate, el => el.expression, el => this.visitLeftPadded(el, q));
423
- yield q.getAndSend(typePredicate, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
424
- return typePredicate;
425
- });
426
- }
427
- visitUnion(union, q) {
428
- return __awaiter(this, void 0, void 0, function* () {
429
- yield q.getAndSendList(union, el => el.types, el => el.element.id, el => this.visitRightPadded(el, q));
430
- yield q.getAndSend(union, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
431
- return union;
432
- });
433
- }
434
- visitIntersection(intersection, q) {
435
- return __awaiter(this, void 0, void 0, function* () {
436
- yield q.getAndSendList(intersection, el => el.types, el => el.element.id, el => this.visitRightPadded(el, q));
437
- yield q.getAndSend(intersection, el => (0, rpc_1.asRef)(el.type), el => this.visitType(el, q));
438
- return intersection;
439
- });
440
- }
441
- visitVoid(void_, q) {
442
- return __awaiter(this, void 0, void 0, function* () {
443
- yield q.getAndSend(void_, el => el.expression, el => this.visit(el, q));
444
- return void_;
445
- });
446
- }
447
- visitWithStatement(withStatement, q) {
448
- return __awaiter(this, void 0, void 0, function* () {
449
- yield q.getAndSend(withStatement, el => el.expression, el => this.visit(el, q));
450
- yield q.getAndSend(withStatement, el => el.body, el => this.visitRightPadded(el, q));
451
- return withStatement;
452
- });
453
- }
454
- visitJsxTag(tag, q) {
455
- return __awaiter(this, void 0, void 0, function* () {
456
- yield q.getAndSend(tag, el => el.openName, el => this.visitLeftPadded(el, q));
457
- yield q.getAndSend(tag, el => el.typeArguments, el => this.visitContainer(el, q));
458
- yield q.getAndSend(tag, el => el.afterName, space => this.visitSpace(space, q));
459
- yield q.getAndSendList(tag, el => el.attributes, attr => attr.element.id, attr => this.visitRightPadded(attr, q));
460
- yield q.getAndSend(tag, el => el.selfClosing, space => this.visitSpace(space, q));
461
- yield q.getAndSendList(tag, el => el.children, child => child.id, child => this.visit(child, q));
462
- yield q.getAndSend(tag, el => el.closingName, el => this.visitLeftPadded(el, q));
463
- yield q.getAndSend(tag, el => el.afterClosingName, el => this.visitSpace(el, q));
464
- return tag;
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
- const _super = Object.create(null, {
627
- visit: { get: () => super.visit }
628
- });
629
- return __awaiter(this, void 0, void 0, function* () {
630
- // Delegate to JavaScript sender if this is a JavaScript element
631
- if ((0, tree_1.isJavaScript)(tree)) {
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
- const _super = Object.create(null, {
646
- visit: { get: () => super.visit }
647
- });
648
- return __awaiter(this, void 0, void 0, function* () {
649
- if ((0, tree_1.isJavaScript)(tree)) {
650
- return _super.visit.call(this, tree, p, parent);
651
- }
652
- return this.delegate.visit(tree, p, parent);
653
- });
654
- }
655
- preVisit(j, q) {
656
- return __awaiter(this, void 0, void 0, function* () {
657
- const updates = {
658
- id: yield q.receive(j.id),
659
- prefix: yield q.receive(j.prefix, space => this.visitSpace(space, q)),
660
- markers: yield q.receive(j.markers)
661
- };
662
- return (0, util_1.updateIfChanged)(j, updates);
663
- });
664
- }
665
- visitJsCompilationUnit(cu, q) {
666
- return __awaiter(this, void 0, void 0, function* () {
667
- const updates = {
668
- sourcePath: yield q.receive(cu.sourcePath),
669
- charsetName: yield q.receive(cu.charsetName),
670
- charsetBomMarked: yield q.receive(cu.charsetBomMarked),
671
- checksum: yield q.receive(cu.checksum),
672
- fileAttributes: yield q.receive(cu.fileAttributes),
673
- statements: yield q.receiveListDefined(cu.statements, stmt => this.visitRightPadded(stmt, q)),
674
- eof: yield q.receive(cu.eof, space => this.visitSpace(space, q))
675
- };
676
- return (0, util_1.updateIfChanged)(cu, updates);
677
- });
678
- }
679
- visitAlias(alias, q) {
680
- return __awaiter(this, void 0, void 0, function* () {
681
- const updates = {
682
- propertyName: yield q.receive(alias.propertyName, el => this.visitRightPadded(el, q)),
683
- alias: yield q.receive(alias.alias, el => this.visitDefined(el, q))
684
- };
685
- return (0, util_1.updateIfChanged)(alias, updates);
686
- });
687
- }
688
- visitArrowFunction(arrowFunction, q) {
689
- return __awaiter(this, void 0, void 0, function* () {
690
- const updates = {
691
- leadingAnnotations: yield q.receiveListDefined(arrowFunction.leadingAnnotations, el => this.visitDefined(el, q)),
692
- modifiers: yield q.receiveListDefined(arrowFunction.modifiers, el => this.visitDefined(el, q)),
693
- typeParameters: yield q.receive(arrowFunction.typeParameters, el => this.visitDefined(el, q)),
694
- lambda: yield q.receive(arrowFunction.lambda, el => this.visitDefined(el, q)),
695
- returnTypeExpression: yield q.receive(arrowFunction.returnTypeExpression, el => this.visitDefined(el, q))
696
- };
697
- return (0, util_1.updateIfChanged)(arrowFunction, updates);
698
- });
699
- }
700
- visitAwait(anAwait, q) {
701
- return __awaiter(this, void 0, void 0, function* () {
702
- const updates = {
703
- expression: yield q.receive(anAwait.expression, el => this.visitDefined(el, q)),
704
- type: yield q.receive(anAwait.type, el => this.visitType(el, q))
705
- };
706
- return (0, util_1.updateIfChanged)(anAwait, updates);
707
- });
708
- }
709
- visitConditionalType(conditionalType, q) {
710
- return __awaiter(this, void 0, void 0, function* () {
711
- const updates = {
712
- checkType: yield q.receive(conditionalType.checkType, el => this.visitDefined(el, q)),
713
- condition: yield q.receive(conditionalType.condition, el => this.visitLeftPadded(el, q)),
714
- type: yield q.receive(conditionalType.type, el => this.visitType(el, q))
715
- };
716
- return (0, util_1.updateIfChanged)(conditionalType, updates);
717
- });
718
- }
719
- visitDelete(delete_, q) {
720
- return __awaiter(this, void 0, void 0, function* () {
721
- const updates = {
722
- expression: yield q.receive(delete_.expression, el => this.visitDefined(el, q))
723
- };
724
- return (0, util_1.updateIfChanged)(delete_, updates);
725
- });
726
- }
727
- visitExpressionStatement(expressionStatement, q) {
728
- return __awaiter(this, void 0, void 0, function* () {
729
- const updates = {
730
- expression: yield q.receive(expressionStatement.expression, el => this.visitDefined(el, q))
731
- };
732
- return (0, util_1.updateIfChanged)(expressionStatement, updates);
733
- });
734
- }
735
- visitExpressionWithTypeArguments(expressionWithTypeArguments, q) {
736
- return __awaiter(this, void 0, void 0, function* () {
737
- const updates = {
738
- clazz: yield q.receive(expressionWithTypeArguments.clazz, el => this.visitDefined(el, q)),
739
- typeArguments: yield q.receive(expressionWithTypeArguments.typeArguments, el => this.visitContainer(el, q)),
740
- type: yield q.receive(expressionWithTypeArguments.type, el => this.visitType(el, q))
741
- };
742
- return (0, util_1.updateIfChanged)(expressionWithTypeArguments, updates);
743
- });
744
- }
745
- visitFunctionCall(functionCall, q) {
746
- return __awaiter(this, void 0, void 0, function* () {
747
- const updates = {
748
- function: yield q.receive(functionCall.function, select => this.visitRightPadded(select, q)),
749
- typeParameters: yield q.receive(functionCall.typeParameters, typeParams => this.visitContainer(typeParams, q)),
750
- arguments: yield q.receive(functionCall.arguments, args => this.visitContainer(args, q)),
751
- methodType: yield q.receive(functionCall.methodType, type => this.visitType(type, q))
752
- };
753
- return (0, util_1.updateIfChanged)(functionCall, updates);
754
- });
755
- }
756
- visitFunctionType(functionType, q) {
757
- return __awaiter(this, void 0, void 0, function* () {
758
- const updates = {
759
- modifiers: yield q.receiveListDefined(functionType.modifiers, el => this.visitDefined(el, q)),
760
- constructorType: yield q.receive(functionType.constructorType, el => this.visitLeftPadded(el, q)),
761
- typeParameters: yield q.receive(functionType.typeParameters, el => this.visitDefined(el, q)),
762
- parameters: yield q.receive(functionType.parameters, el => this.visitContainer(el, q)),
763
- returnType: yield q.receive(functionType.returnType, el => this.visitLeftPadded(el, q))
764
- };
765
- return (0, util_1.updateIfChanged)(functionType, updates);
766
- });
767
- }
768
- visitInferType(inferType, q) {
769
- return __awaiter(this, void 0, void 0, function* () {
770
- const updates = {
771
- typeParameter: yield q.receive(inferType.typeParameter, el => this.visitLeftPadded(el, q)),
772
- type: yield q.receive(inferType.type, el => this.visitType(el, q))
773
- };
774
- return (0, util_1.updateIfChanged)(inferType, updates);
775
- });
776
- }
777
- visitImportType(importType, q) {
778
- return __awaiter(this, void 0, void 0, function* () {
779
- const updates = {
780
- hasTypeof: yield q.receive(importType.hasTypeof, el => this.visitRightPadded(el, q)),
781
- argumentAndAttributes: yield q.receive(importType.argumentAndAttributes, el => this.visitContainer(el, q)),
782
- qualifier: yield q.receive(importType.qualifier, el => this.visitLeftPadded(el, q)),
783
- typeArguments: yield q.receive(importType.typeArguments, el => this.visitContainer(el, q)),
784
- type: yield q.receive(importType.type, el => this.visitType(el, q))
785
- };
786
- return (0, util_1.updateIfChanged)(importType, updates);
787
- });
788
- }
789
- visitImportDeclaration(jsImport, q) {
790
- return __awaiter(this, void 0, void 0, function* () {
791
- const updates = {
792
- modifiers: yield q.receiveListDefined(jsImport.modifiers, el => this.visitDefined(el, q)),
793
- importClause: yield q.receive(jsImport.importClause, el => this.visitDefined(el, q)),
794
- moduleSpecifier: yield q.receive(jsImport.moduleSpecifier, el => this.visitLeftPadded(el, q)),
795
- attributes: yield q.receive(jsImport.attributes, el => this.visitDefined(el, q)),
796
- initializer: yield q.receive(jsImport.initializer, el => this.visitLeftPadded(el, q))
797
- };
798
- return (0, util_1.updateIfChanged)(jsImport, updates);
799
- });
800
- }
801
- visitImportClause(jsImportClause, q) {
802
- return __awaiter(this, void 0, void 0, function* () {
803
- const updates = {
804
- typeOnly: yield q.receive(jsImportClause.typeOnly),
805
- name: yield q.receive(jsImportClause.name, el => this.visitRightPadded(el, q)),
806
- namedBindings: yield q.receive(jsImportClause.namedBindings, el => this.visitDefined(el, q))
807
- };
808
- return (0, util_1.updateIfChanged)(jsImportClause, updates);
809
- });
810
- }
811
- visitNamedImports(namedImports, q) {
812
- return __awaiter(this, void 0, void 0, function* () {
813
- const updates = {
814
- elements: yield q.receive(namedImports.elements, el => this.visitContainer(el, q)),
815
- type: yield q.receive(namedImports.type, el => this.visitType(el, q))
816
- };
817
- return (0, util_1.updateIfChanged)(namedImports, updates);
818
- });
819
- }
820
- visitImportSpecifier(jsImportSpecifier, q) {
821
- return __awaiter(this, void 0, void 0, function* () {
822
- const updates = {
823
- importType: yield q.receive(jsImportSpecifier.importType, el => this.visitLeftPadded(el, q)),
824
- specifier: yield q.receive(jsImportSpecifier.specifier, el => this.visitDefined(el, q)),
825
- type: yield q.receive(jsImportSpecifier.type, el => this.visitType(el, q))
826
- };
827
- return (0, util_1.updateIfChanged)(jsImportSpecifier, updates);
828
- });
829
- }
830
- visitImportAttributes(importAttributes, q) {
831
- return __awaiter(this, void 0, void 0, function* () {
832
- const updates = {
833
- token: yield q.receive(importAttributes.token),
834
- elements: yield q.receive(importAttributes.elements, el => this.visitContainer(el, q))
835
- };
836
- return (0, util_1.updateIfChanged)(importAttributes, updates);
837
- });
838
- }
839
- visitImportTypeAttributes(importTypeAttributes, q) {
840
- return __awaiter(this, void 0, void 0, function* () {
841
- const updates = {
842
- token: yield q.receive(importTypeAttributes.token, el => this.visitRightPadded(el, q)),
843
- elements: yield q.receive(importTypeAttributes.elements, el => this.visitContainer(el, q)),
844
- end: yield q.receive(importTypeAttributes.end, el => this.visitSpace(el, q))
845
- };
846
- return (0, util_1.updateIfChanged)(importTypeAttributes, updates);
847
- });
848
- }
849
- visitImportAttribute(importAttribute, q) {
850
- return __awaiter(this, void 0, void 0, function* () {
851
- const updates = {
852
- name: yield q.receive(importAttribute.name, el => this.visitDefined(el, q)),
853
- value: yield q.receive(importAttribute.value, el => this.visitLeftPadded(el, q))
854
- };
855
- return (0, util_1.updateIfChanged)(importAttribute, updates);
856
- });
857
- }
858
- visitBinaryExtensions(binary, q) {
859
- return __awaiter(this, void 0, void 0, function* () {
860
- const updates = {
861
- left: yield q.receive(binary.left, el => this.visitDefined(el, q)),
862
- operator: yield q.receive(binary.operator, el => this.visitLeftPadded(el, q)),
863
- right: yield q.receive(binary.right, el => this.visitDefined(el, q)),
864
- type: yield q.receive(binary.type, el => this.visitType(el, q))
865
- };
866
- return (0, util_1.updateIfChanged)(binary, updates);
867
- });
868
- }
869
- visitLiteralType(literalType, q) {
870
- return __awaiter(this, void 0, void 0, function* () {
871
- const updates = {
872
- literal: yield q.receive(literalType.literal, el => this.visitDefined(el, q)),
873
- type: yield q.receive(literalType.type, el => this.visitType(el, q))
874
- };
875
- return (0, util_1.updateIfChanged)(literalType, updates);
876
- });
877
- }
878
- visitMappedType(mappedType, q) {
879
- return __awaiter(this, void 0, void 0, function* () {
880
- const updates = {
881
- prefixToken: yield q.receive(mappedType.prefixToken, el => this.visitLeftPadded(el, q)),
882
- hasReadonly: yield q.receive(mappedType.hasReadonly, el => this.visitLeftPadded(el, q)),
883
- keysRemapping: yield q.receive(mappedType.keysRemapping, el => this.visitDefined(el, q)),
884
- suffixToken: yield q.receive(mappedType.suffixToken, el => this.visitLeftPadded(el, q)),
885
- hasQuestionToken: yield q.receive(mappedType.hasQuestionToken, el => this.visitLeftPadded(el, q)),
886
- valueType: yield q.receive(mappedType.valueType, el => this.visitContainer(el, q)),
887
- type: yield q.receive(mappedType.type, el => this.visitType(el, q))
888
- };
889
- return (0, util_1.updateIfChanged)(mappedType, updates);
890
- });
891
- }
892
- visitMappedTypeKeysRemapping(keysRemapping, q) {
893
- return __awaiter(this, void 0, void 0, function* () {
894
- const updates = {
895
- typeParameter: yield q.receive(keysRemapping.typeParameter, el => this.visitRightPadded(el, q)),
896
- nameType: yield q.receive(keysRemapping.nameType, el => this.visitRightPadded(el, q))
897
- };
898
- return (0, util_1.updateIfChanged)(keysRemapping, updates);
899
- });
900
- }
901
- visitMappedTypeParameter(mappedTypeParameter, q) {
902
- return __awaiter(this, void 0, void 0, function* () {
903
- const updates = {
904
- name: yield q.receive(mappedTypeParameter.name, el => this.visitDefined(el, q)),
905
- iterateType: yield q.receive(mappedTypeParameter.iterateType, el => this.visitLeftPadded(el, q))
906
- };
907
- return (0, util_1.updateIfChanged)(mappedTypeParameter, updates);
908
- });
909
- }
910
- visitObjectBindingPattern(objectBindingPattern, q) {
911
- return __awaiter(this, void 0, void 0, function* () {
912
- const updates = {
913
- leadingAnnotations: yield q.receiveListDefined(objectBindingPattern.leadingAnnotations, el => this.visitDefined(el, q)),
914
- modifiers: yield q.receiveListDefined(objectBindingPattern.modifiers, el => this.visitDefined(el, q)),
915
- typeExpression: yield q.receive(objectBindingPattern.typeExpression, el => this.visitDefined(el, q)),
916
- bindings: yield q.receive(objectBindingPattern.bindings, el => this.visitContainer(el, q)),
917
- initializer: yield q.receive(objectBindingPattern.initializer, el => this.visitLeftPadded(el, q))
918
- };
919
- return (0, util_1.updateIfChanged)(objectBindingPattern, updates);
920
- });
921
- }
922
- visitPropertyAssignment(propertyAssignment, q) {
923
- return __awaiter(this, void 0, void 0, function* () {
924
- const updates = {
925
- name: yield q.receive(propertyAssignment.name, el => this.visitRightPadded(el, q)),
926
- assigmentToken: yield q.receive(propertyAssignment.assigmentToken),
927
- initializer: yield q.receive(propertyAssignment.initializer, el => this.visitDefined(el, q))
928
- };
929
- return (0, util_1.updateIfChanged)(propertyAssignment, updates);
930
- });
931
- }
932
- visitSatisfiesExpression(satisfiesExpression, q) {
933
- return __awaiter(this, void 0, void 0, function* () {
934
- const updates = {
935
- expression: yield q.receive(satisfiesExpression.expression, el => this.visitDefined(el, q)),
936
- satisfiesType: yield q.receive(satisfiesExpression.satisfiesType, el => this.visitLeftPadded(el, q)),
937
- type: yield q.receive(satisfiesExpression.type, el => this.visitType(el, q))
938
- };
939
- return (0, util_1.updateIfChanged)(satisfiesExpression, updates);
940
- });
941
- }
942
- visitScopedVariableDeclarations(scopedVariableDeclarations, q) {
943
- return __awaiter(this, void 0, void 0, function* () {
944
- const updates = {
945
- modifiers: yield q.receiveListDefined(scopedVariableDeclarations.modifiers, el => this.visitDefined(el, q)),
946
- variables: yield q.receiveListDefined(scopedVariableDeclarations.variables, el => this.visitRightPadded(el, q))
947
- };
948
- return (0, util_1.updateIfChanged)(scopedVariableDeclarations, updates);
949
- });
950
- }
951
- visitShebang(shebang, q) {
952
- return __awaiter(this, void 0, void 0, function* () {
953
- const updates = {
954
- text: yield q.receive(shebang.text)
955
- };
956
- return (0, util_1.updateIfChanged)(shebang, updates);
957
- });
958
- }
959
- visitSpread(spread, q) {
960
- return __awaiter(this, void 0, void 0, function* () {
961
- const updates = {
962
- expression: yield q.receive(spread.expression, el => this.visitDefined(el, q)),
963
- type: yield q.receive(spread.type, el => this.visitType(el, q))
964
- };
965
- return (0, util_1.updateIfChanged)(spread, updates);
966
- });
967
- }
968
- visitStatementExpression(statementExpression, q) {
969
- return __awaiter(this, void 0, void 0, function* () {
970
- const updates = {
971
- statement: yield q.receive(statementExpression.statement, el => this.visitDefined(el, q))
972
- };
973
- return (0, util_1.updateIfChanged)(statementExpression, updates);
974
- });
975
- }
976
- visitTaggedTemplateExpression(taggedTemplateExpression, q) {
977
- return __awaiter(this, void 0, void 0, function* () {
978
- const updates = {
979
- tag: yield q.receive(taggedTemplateExpression.tag, el => this.visitRightPadded(el, q)),
980
- typeArguments: yield q.receive(taggedTemplateExpression.typeArguments, el => this.visitContainer(el, q)),
981
- templateExpression: yield q.receive(taggedTemplateExpression.templateExpression, el => this.visitDefined(el, q)),
982
- type: yield q.receive(taggedTemplateExpression.type, el => this.visitType(el, q))
983
- };
984
- return (0, util_1.updateIfChanged)(taggedTemplateExpression, updates);
985
- });
986
- }
987
- visitTemplateExpression(templateExpression, q) {
988
- return __awaiter(this, void 0, void 0, function* () {
989
- const updates = {
990
- head: yield q.receive(templateExpression.head, el => this.visitDefined(el, q)),
991
- spans: yield q.receiveListDefined(templateExpression.spans, el => this.visitRightPadded(el, q)),
992
- type: yield q.receive(templateExpression.type, el => this.visitType(el, q))
993
- };
994
- return (0, util_1.updateIfChanged)(templateExpression, updates);
995
- });
996
- }
997
- visitTemplateExpressionSpan(span, q) {
998
- return __awaiter(this, void 0, void 0, function* () {
999
- const updates = {
1000
- expression: yield q.receive(span.expression, el => this.visitDefined(el, q)),
1001
- tail: yield q.receive(span.tail, el => this.visitDefined(el, q))
1002
- };
1003
- return (0, util_1.updateIfChanged)(span, updates);
1004
- });
1005
- }
1006
- visitTuple(tuple, q) {
1007
- return __awaiter(this, void 0, void 0, function* () {
1008
- const updates = {
1009
- elements: yield q.receive(tuple.elements, el => this.visitContainer(el, q)),
1010
- type: yield q.receive(tuple.type, el => this.visitType(el, q))
1011
- };
1012
- return (0, util_1.updateIfChanged)(tuple, updates);
1013
- });
1014
- }
1015
- visitTypeDeclaration(typeDeclaration, q) {
1016
- return __awaiter(this, void 0, void 0, function* () {
1017
- const updates = {
1018
- modifiers: yield q.receiveListDefined(typeDeclaration.modifiers, el => this.visitDefined(el, q)),
1019
- name: yield q.receive(typeDeclaration.name, el => this.visitLeftPadded(el, q)),
1020
- typeParameters: yield q.receive(typeDeclaration.typeParameters, el => this.visitDefined(el, q)),
1021
- initializer: yield q.receive(typeDeclaration.initializer, el => this.visitLeftPadded(el, q)),
1022
- type: yield q.receive(typeDeclaration.type, el => this.visitType(el, q))
1023
- };
1024
- return (0, util_1.updateIfChanged)(typeDeclaration, updates);
1025
- });
1026
- }
1027
- visitTypeOf(typeOf, q) {
1028
- return __awaiter(this, void 0, void 0, function* () {
1029
- const updates = {
1030
- expression: yield q.receive(typeOf.expression, el => this.visitDefined(el, q)),
1031
- type: yield q.receive(typeOf.type, el => this.visitType(el, q))
1032
- };
1033
- return (0, util_1.updateIfChanged)(typeOf, updates);
1034
- });
1035
- }
1036
- visitTypeTreeExpression(typeTreeExpression, q) {
1037
- return __awaiter(this, void 0, void 0, function* () {
1038
- const updates = {
1039
- expression: yield q.receive(typeTreeExpression.expression, el => this.visitDefined(el, q))
1040
- };
1041
- return (0, util_1.updateIfChanged)(typeTreeExpression, updates);
1042
- });
1043
- }
1044
- visitAs(as_, q) {
1045
- return __awaiter(this, void 0, void 0, function* () {
1046
- const updates = {
1047
- left: yield q.receive(as_.left, el => this.visitRightPadded(el, q)),
1048
- right: yield q.receive(as_.right, el => this.visitDefined(el, q)),
1049
- type: yield q.receive(as_.type, el => this.visitType(el, q))
1050
- };
1051
- return (0, util_1.updateIfChanged)(as_, updates);
1052
- });
1053
- }
1054
- visitAssignmentOperationExtensions(assignmentOperation, q) {
1055
- return __awaiter(this, void 0, void 0, function* () {
1056
- const updates = {
1057
- variable: yield q.receive(assignmentOperation.variable, el => this.visitDefined(el, q)),
1058
- operator: yield q.receive(assignmentOperation.operator, el => this.visitLeftPadded(el, q)),
1059
- assignment: yield q.receive(assignmentOperation.assignment, el => this.visitDefined(el, q)),
1060
- type: yield q.receive(assignmentOperation.type, el => this.visitType(el, q))
1061
- };
1062
- return (0, util_1.updateIfChanged)(assignmentOperation, updates);
1063
- });
1064
- }
1065
- visitIndexedAccessType(indexedAccessType, q) {
1066
- return __awaiter(this, void 0, void 0, function* () {
1067
- const updates = {
1068
- objectType: yield q.receive(indexedAccessType.objectType, el => this.visitDefined(el, q)),
1069
- indexType: yield q.receive(indexedAccessType.indexType, el => this.visitDefined(el, q)),
1070
- type: yield q.receive(indexedAccessType.type, el => this.visitType(el, q))
1071
- };
1072
- return (0, util_1.updateIfChanged)(indexedAccessType, updates);
1073
- });
1074
- }
1075
- visitIndexedAccessTypeIndexType(indexType, q) {
1076
- return __awaiter(this, void 0, void 0, function* () {
1077
- const updates = {
1078
- element: yield q.receive(indexType.element, el => this.visitRightPadded(el, q)),
1079
- type: yield q.receive(indexType.type, el => this.visitType(el, q))
1080
- };
1081
- return (0, util_1.updateIfChanged)(indexType, updates);
1082
- });
1083
- }
1084
- visitTypeQuery(typeQuery, q) {
1085
- return __awaiter(this, void 0, void 0, function* () {
1086
- const updates = {
1087
- typeExpression: yield q.receive(typeQuery.typeExpression, el => this.visitDefined(el, q)),
1088
- typeArguments: yield q.receive(typeQuery.typeArguments, el => this.visitContainer(el, q)),
1089
- type: yield q.receive(typeQuery.type, el => this.visitType(el, q))
1090
- };
1091
- return (0, util_1.updateIfChanged)(typeQuery, updates);
1092
- });
1093
- }
1094
- visitTypeInfo(typeInfo, q) {
1095
- return __awaiter(this, void 0, void 0, function* () {
1096
- const updates = {
1097
- typeIdentifier: yield q.receive(typeInfo.typeIdentifier, el => this.visitDefined(el, q))
1098
- };
1099
- return (0, util_1.updateIfChanged)(typeInfo, updates);
1100
- });
1101
- }
1102
- visitComputedPropertyName(computedPropertyName, q) {
1103
- return __awaiter(this, void 0, void 0, function* () {
1104
- const updates = {
1105
- expression: yield q.receive(computedPropertyName.expression, el => this.visitRightPadded(el, q))
1106
- };
1107
- return (0, util_1.updateIfChanged)(computedPropertyName, updates);
1108
- });
1109
- }
1110
- visitTypeOperator(typeOperator, q) {
1111
- return __awaiter(this, void 0, void 0, function* () {
1112
- const updates = {
1113
- operator: yield q.receive(typeOperator.operator),
1114
- expression: yield q.receive(typeOperator.expression, el => this.visitLeftPadded(el, q))
1115
- };
1116
- return (0, util_1.updateIfChanged)(typeOperator, updates);
1117
- });
1118
- }
1119
- visitTypePredicate(typePredicate, q) {
1120
- return __awaiter(this, void 0, void 0, function* () {
1121
- const updates = {
1122
- asserts: yield q.receive(typePredicate.asserts, el => this.visitLeftPadded(el, q)),
1123
- parameterName: yield q.receive(typePredicate.parameterName, el => this.visitDefined(el, q)),
1124
- expression: yield q.receive(typePredicate.expression, el => this.visitLeftPadded(el, q)),
1125
- type: yield q.receive(typePredicate.type, el => this.visitType(el, q))
1126
- };
1127
- return (0, util_1.updateIfChanged)(typePredicate, updates);
1128
- });
1129
- }
1130
- visitUnion(union, q) {
1131
- return __awaiter(this, void 0, void 0, function* () {
1132
- const updates = {
1133
- types: yield q.receiveListDefined(union.types, el => this.visitRightPadded(el, q)),
1134
- type: yield q.receive(union.type, el => this.visitType(el, q))
1135
- };
1136
- return (0, util_1.updateIfChanged)(union, updates);
1137
- });
1138
- }
1139
- visitIntersection(intersection, q) {
1140
- return __awaiter(this, void 0, void 0, function* () {
1141
- const updates = {
1142
- types: yield q.receiveListDefined(intersection.types, el => this.visitRightPadded(el, q)),
1143
- type: yield q.receive(intersection.type, el => this.visitType(el, q))
1144
- };
1145
- return (0, util_1.updateIfChanged)(intersection, updates);
1146
- });
1147
- }
1148
- visitVoid(void_, q) {
1149
- return __awaiter(this, void 0, void 0, function* () {
1150
- const updates = {
1151
- expression: yield q.receive(void_.expression, el => this.visitDefined(el, q))
1152
- };
1153
- return (0, util_1.updateIfChanged)(void_, updates);
1154
- });
1155
- }
1156
- visitWithStatement(withStatement, q) {
1157
- return __awaiter(this, void 0, void 0, function* () {
1158
- const updates = {
1159
- expression: yield q.receive(withStatement.expression, el => this.visitDefined(el, q)),
1160
- body: yield q.receive(withStatement.body, el => this.visitRightPadded(el, q))
1161
- };
1162
- return (0, util_1.updateIfChanged)(withStatement, updates);
1163
- });
1164
- }
1165
- visitJsxTag(tag, q) {
1166
- return __awaiter(this, void 0, void 0, function* () {
1167
- const updates = {
1168
- openName: yield q.receive(tag.openName, el => this.visitLeftPadded(el, q)),
1169
- typeArguments: yield q.receive(tag.typeArguments, el => this.visitContainer(el, q)),
1170
- afterName: yield q.receive(tag.afterName, space => this.visitSpace(space, q)),
1171
- attributes: yield q.receiveListDefined(tag.attributes, attr => this.visitRightPadded(attr, q)),
1172
- selfClosing: yield q.receive(tag.selfClosing, space => this.visitSpace(space, q)),
1173
- children: yield q.receiveList(tag.children, child => this.visit(child, q)),
1174
- closingName: yield q.receive(tag.closingName, el => this.visitLeftPadded(el, q)),
1175
- afterClosingName: yield q.receive(tag.afterClosingName, el => this.visitSpace(el, q))
1176
- };
1177
- // Type assertion is needed due to `JSX.Tag` being a union type
1178
- return (0, util_1.updateIfChanged)(tag, updates);
1179
- });
1180
- }
1181
- visitJsxAttribute(attribute, q) {
1182
- return __awaiter(this, void 0, void 0, function* () {
1183
- const updates = {
1184
- key: yield q.receive(attribute.key, el => this.visitDefined(el, q)),
1185
- value: yield q.receive(attribute.value, el => this.visitLeftPadded(el, q))
1186
- };
1187
- return (0, util_1.updateIfChanged)(attribute, updates);
1188
- });
1189
- }
1190
- visitJsxSpreadAttribute(spreadAttribute, q) {
1191
- return __awaiter(this, void 0, void 0, function* () {
1192
- const updates = {
1193
- dots: yield q.receive(spreadAttribute.dots, space => this.visitSpace(space, q)),
1194
- expression: yield q.receive(spreadAttribute.expression, el => this.visitRightPadded(el, q))
1195
- };
1196
- return (0, util_1.updateIfChanged)(spreadAttribute, updates);
1197
- });
1198
- }
1199
- visitJsxEmbeddedExpression(embeddedExpression, q) {
1200
- return __awaiter(this, void 0, void 0, function* () {
1201
- const updates = {
1202
- expression: yield q.receive(embeddedExpression.expression, el => this.visitRightPadded(el, q))
1203
- };
1204
- return (0, util_1.updateIfChanged)(embeddedExpression, updates);
1205
- });
1206
- }
1207
- visitJsxNamespacedName(namespacedName, q) {
1208
- return __awaiter(this, void 0, void 0, function* () {
1209
- const updates = {
1210
- namespace: yield q.receive(namespacedName.namespace, el => this.visitDefined(el, q)),
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
- const _super = Object.create(null, {
1373
- visit: { get: () => super.visit }
1374
- });
1375
- return __awaiter(this, void 0, void 0, function* () {
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);