@openrewrite/rewrite 8.72.2 → 8.72.3

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
  exports.JavaScriptSemanticComparatorVisitor = exports.JavaScriptComparatorVisitor = void 0;
13
4
  /*
@@ -51,16 +42,14 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
51
42
  * @param parentCursor2 Optional parent cursor for the target tree (for navigating to root)
52
43
  * @returns true if the trees match, false otherwise
53
44
  */
54
- compare(tree1, tree2, parentCursor1, parentCursor2) {
55
- return __awaiter(this, void 0, void 0, function* () {
56
- this.match = true;
57
- // Initialize targetCursor with parent if provided, otherwise undefined (will be set by visit())
58
- this.targetCursor = parentCursor2;
59
- // Initialize this.cursor (pattern cursor) with parent if provided
60
- this.cursor = parentCursor1 || new tree_2.Cursor(undefined, undefined);
61
- yield this.visit(tree1, tree2);
62
- return this.match;
63
- });
45
+ async compare(tree1, tree2, parentCursor1, parentCursor2) {
46
+ this.match = true;
47
+ // Initialize targetCursor with parent if provided, otherwise undefined (will be set by visit())
48
+ this.targetCursor = parentCursor2;
49
+ // Initialize this.cursor (pattern cursor) with parent if provided
50
+ this.cursor = parentCursor1 || new tree_2.Cursor(undefined, undefined);
51
+ await this.visit(tree1, tree2);
52
+ return this.match;
64
53
  }
65
54
  /**
66
55
  * Checks if two nodes have the same kind.
@@ -131,20 +120,18 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
131
120
  * @param visitor Function to visit each element pair (no need to return anything)
132
121
  * @returns undefined, modifying this.match if a mismatch occurs
133
122
  */
134
- visitArrayProperty(parent, propertyName, array1, array2, visitor) {
135
- return __awaiter(this, void 0, void 0, function* () {
136
- // Check length mismatch
137
- if (array1.length !== array2.length) {
138
- this.arrayLengthMismatch(propertyName);
123
+ async visitArrayProperty(parent, propertyName, array1, array2, visitor) {
124
+ // Check length mismatch
125
+ if (array1.length !== array2.length) {
126
+ this.arrayLengthMismatch(propertyName);
127
+ return;
128
+ }
129
+ // Visit each element in lock step
130
+ for (let i = 0; i < array1.length; i++) {
131
+ await visitor(array1[i], array2[i], i);
132
+ if (!this.match)
139
133
  return;
140
- }
141
- // Visit each element in lock step
142
- for (let i = 0; i < array1.length; i++) {
143
- yield visitor(array1[i], array2[i], i);
144
- if (!this.match)
145
- return;
146
- }
147
- });
134
+ }
148
135
  }
149
136
  /**
150
137
  * Helper method to visit a container property with proper context.
@@ -156,13 +143,11 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
156
143
  * @param otherContainer The container from the second tree
157
144
  * @returns The container from the first tree
158
145
  */
159
- visitContainerProperty(propertyName, container, otherContainer) {
160
- return __awaiter(this, void 0, void 0, function* () {
161
- // Default implementation just calls visitContainer
162
- // Subclasses can override to add property context
163
- yield this.visitContainer(container, otherContainer);
164
- return container;
165
- });
146
+ async visitContainerProperty(propertyName, container, otherContainer) {
147
+ // Default implementation just calls visitContainer
148
+ // Subclasses can override to add property context
149
+ await this.visitContainer(container, otherContainer);
150
+ return container;
166
151
  }
167
152
  /**
168
153
  * Helper to visit a RightPadded property with property context.
@@ -173,12 +158,10 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
173
158
  * @param otherRightPadded The RightPadded from the second tree
174
159
  * @returns The RightPadded from the first tree
175
160
  */
176
- visitRightPaddedProperty(propertyName, rightPadded, otherRightPadded) {
177
- return __awaiter(this, void 0, void 0, function* () {
178
- // Default implementation just calls visitRightPadded
179
- // Subclasses can override to add property context
180
- return yield this.visitRightPadded(rightPadded, otherRightPadded);
181
- });
161
+ async visitRightPaddedProperty(propertyName, rightPadded, otherRightPadded) {
162
+ // Default implementation just calls visitRightPadded
163
+ // Subclasses can override to add property context
164
+ return await this.visitRightPadded(rightPadded, otherRightPadded);
182
165
  }
183
166
  /**
184
167
  * Helper to visit a LeftPadded property with property context.
@@ -189,12 +172,10 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
189
172
  * @param otherLeftPadded The LeftPadded from the second tree
190
173
  * @returns The LeftPadded from the first tree
191
174
  */
192
- visitLeftPaddedProperty(propertyName, leftPadded, otherLeftPadded) {
193
- return __awaiter(this, void 0, void 0, function* () {
194
- // Default implementation just calls visitLeftPadded
195
- // Subclasses can override to add property context
196
- return yield this.visitLeftPadded(leftPadded, otherLeftPadded);
197
- });
175
+ async visitLeftPaddedProperty(propertyName, leftPadded, otherLeftPadded) {
176
+ // Default implementation just calls visitLeftPadded
177
+ // Subclasses can override to add property context
178
+ return await this.visitLeftPadded(leftPadded, otherLeftPadded);
198
179
  }
199
180
  /**
200
181
  * Generic method to visit a property value using the appropriate visitor method.
@@ -205,50 +186,48 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
205
186
  * @param propertyName Optional property name for error reporting
206
187
  * @returns The visited property value from the first tree
207
188
  */
208
- visitProperty(j, other, propertyName) {
209
- return __awaiter(this, void 0, void 0, function* () {
210
- // Handle null/undefined (but not other falsy values like 0, false, '')
211
- if (j == null || other == null) {
212
- if (j !== other) {
213
- return this.structuralMismatch(propertyName);
214
- }
215
- return j;
216
- }
217
- const kind = j.kind;
218
- // Check wrappers by kind
219
- if (kind === java_1.J.Kind.RightPadded) {
220
- return propertyName ? yield this.visitRightPaddedProperty(propertyName, j, other) :
221
- yield this.visitRightPadded(j, other);
222
- }
223
- if (kind === java_1.J.Kind.LeftPadded) {
224
- return propertyName ? yield this.visitLeftPaddedProperty(propertyName, j, other) :
225
- yield this.visitLeftPadded(j, other);
226
- }
227
- if (kind === java_1.J.Kind.Container) {
228
- // Use visitContainerProperty when propertyName is provided for proper context tracking
229
- if (propertyName) {
230
- return yield this.visitContainerProperty(propertyName, j, other);
231
- }
232
- return yield this.visitContainer(j, other);
233
- }
234
- // Check if it's a Space (skip comparison)
235
- if (kind === java_1.J.Kind.Space) {
236
- return j;
237
- }
238
- // Check if it's a Type node
239
- if (java_1.Type.isType(j)) {
240
- return yield this.visitType(j, other);
241
- }
242
- // Check if it's a Tree node (has a kind property with a string value)
243
- if (kind !== undefined && typeof kind === 'string') {
244
- return yield this.visit(j, other);
245
- }
246
- // For primitive values, compare directly
189
+ async visitProperty(j, other, propertyName) {
190
+ // Handle null/undefined (but not other falsy values like 0, false, '')
191
+ if (j == null || other == null) {
247
192
  if (j !== other) {
248
- return this.valueMismatch(propertyName, j, other);
193
+ return this.structuralMismatch(propertyName);
249
194
  }
250
195
  return j;
251
- });
196
+ }
197
+ const kind = j.kind;
198
+ // Check wrappers by kind
199
+ if (kind === java_1.J.Kind.RightPadded) {
200
+ return propertyName ? await this.visitRightPaddedProperty(propertyName, j, other) :
201
+ await this.visitRightPadded(j, other);
202
+ }
203
+ if (kind === java_1.J.Kind.LeftPadded) {
204
+ return propertyName ? await this.visitLeftPaddedProperty(propertyName, j, other) :
205
+ await this.visitLeftPadded(j, other);
206
+ }
207
+ if (kind === java_1.J.Kind.Container) {
208
+ // Use visitContainerProperty when propertyName is provided for proper context tracking
209
+ if (propertyName) {
210
+ return await this.visitContainerProperty(propertyName, j, other);
211
+ }
212
+ return await this.visitContainer(j, other);
213
+ }
214
+ // Check if it's a Space (skip comparison)
215
+ if (kind === java_1.J.Kind.Space) {
216
+ return j;
217
+ }
218
+ // Check if it's a Type node
219
+ if (java_1.Type.isType(j)) {
220
+ return await this.visitType(j, other);
221
+ }
222
+ // Check if it's a Tree node (has a kind property with a string value)
223
+ if (kind !== undefined && typeof kind === 'string') {
224
+ return await this.visit(j, other);
225
+ }
226
+ // For primitive values, compare directly
227
+ if (j !== other) {
228
+ return this.valueMismatch(propertyName, j, other);
229
+ }
230
+ return j;
252
231
  }
253
232
  /**
254
233
  * Generic method to visit all properties of an element, calling visitProperty for each.
@@ -259,67 +238,60 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
259
238
  * @param other The corresponding element from the second tree
260
239
  * @returns The visited element from the first tree
261
240
  */
262
- visitElement(j, other) {
263
- return __awaiter(this, void 0, void 0, function* () {
264
- if (!this.match)
265
- return j;
266
- // Check if kinds match
267
- if (j.kind !== other.kind) {
268
- return this.kindMismatch();
269
- }
270
- // Iterate over all properties
271
- for (const key of Object.keys(j)) {
272
- // Skip internal/private properties, id property, and markers property
273
- if (key.startsWith('_') || key === 'kind' || key === 'id' || key === 'markers') {
274
- continue;
275
- }
276
- const jValue = j[key];
277
- const otherValue = other[key];
278
- // Handle arrays - compare element by element
279
- if (Array.isArray(jValue)) {
280
- if (!Array.isArray(otherValue) || jValue.length !== otherValue.length) {
281
- return this.arrayLengthMismatch(key);
282
- }
283
- for (let i = 0; i < jValue.length; i++) {
284
- yield this.visitProperty(jValue[i], otherValue[i], `${key}[${i}]`);
285
- if (!this.match)
286
- return j;
287
- }
241
+ async visitElement(j, other) {
242
+ if (!this.match)
243
+ return j;
244
+ // Check if kinds match
245
+ if (j.kind !== other.kind) {
246
+ return this.kindMismatch();
247
+ }
248
+ // Iterate over all properties
249
+ for (const key of Object.keys(j)) {
250
+ // Skip internal/private properties, id property, and markers property
251
+ if (key.startsWith('_') || key === 'kind' || key === 'id' || key === 'markers') {
252
+ continue;
253
+ }
254
+ const jValue = j[key];
255
+ const otherValue = other[key];
256
+ // Handle arrays - compare element by element
257
+ if (Array.isArray(jValue)) {
258
+ if (!Array.isArray(otherValue) || jValue.length !== otherValue.length) {
259
+ return this.arrayLengthMismatch(key);
288
260
  }
289
- else {
290
- // Visit the property (which will handle wrappers, trees, primitives, etc.)
291
- yield this.visitProperty(jValue, otherValue, key);
261
+ for (let i = 0; i < jValue.length; i++) {
262
+ await this.visitProperty(jValue[i], otherValue[i], `${key}[${i}]`);
292
263
  if (!this.match)
293
264
  return j;
294
265
  }
295
266
  }
296
- return j;
297
- });
298
- }
299
- visit(j, p, parent) {
300
- const _super = Object.create(null, {
301
- visit: { get: () => super.visit }
302
- });
303
- return __awaiter(this, void 0, void 0, function* () {
304
- // If we've already found a mismatch, abort further processing
305
- if (!this.match)
306
- return j;
307
- // Check if the nodes have the same kind
308
- if (!this.hasSameKind(j, p)) {
309
- return this.kindMismatch();
310
- }
311
- // Update targetCursor to track the target node in parallel with the pattern cursor
312
- // (Can be overridden by subclasses if they need cursor access before calling super)
313
- const savedTargetCursor = this.targetCursor;
314
- this.targetCursor = new tree_2.Cursor(p, this.targetCursor);
315
- try {
316
- // Continue with normal visitation, passing the other node as context
317
- return yield _super.visit.call(this, j, p);
318
- }
319
- finally {
320
- this.targetCursor = savedTargetCursor;
267
+ else {
268
+ // Visit the property (which will handle wrappers, trees, primitives, etc.)
269
+ await this.visitProperty(jValue, otherValue, key);
270
+ if (!this.match)
271
+ return j;
321
272
  }
322
- });
273
+ }
274
+ return j;
275
+ }
276
+ async visit(j, p, parent) {
277
+ // If we've already found a mismatch, abort further processing
278
+ if (!this.match)
279
+ return j;
280
+ // Check if the nodes have the same kind
281
+ if (!this.hasSameKind(j, p)) {
282
+ return this.kindMismatch();
283
+ }
284
+ // Update targetCursor to track the target node in parallel with the pattern cursor
285
+ // (Can be overridden by subclasses if they need cursor access before calling super)
286
+ const savedTargetCursor = this.targetCursor;
287
+ this.targetCursor = new tree_2.Cursor(p, this.targetCursor);
288
+ try {
289
+ // Continue with normal visitation, passing the other node as context
290
+ return await super.visit(j, p);
291
+ }
292
+ finally {
293
+ this.targetCursor = savedTargetCursor;
294
+ }
323
295
  }
324
296
  /**
325
297
  * Override visitRightPadded to compare only the elements, not markers or spacing.
@@ -327,30 +299,28 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
327
299
  * Pushes the wrapper onto the cursor stack so captures can access it.
328
300
  * Also updates targetCursor in parallel.
329
301
  */
330
- visitRightPadded(right, p) {
331
- return __awaiter(this, void 0, void 0, function* () {
332
- if (!this.match)
333
- return right;
334
- // Extract the other element if it's also a RightPadded
335
- const isRightPadded = p.kind === java_1.J.Kind.RightPadded;
336
- const otherWrapper = isRightPadded ? p : undefined;
337
- const otherElement = isRightPadded ? otherWrapper.element : p;
338
- // Push wrappers onto both cursors, then compare only the elements, not markers or spacing
339
- const savedCursor = this.cursor;
340
- const savedTargetCursor = this.targetCursor;
341
- this.cursor = new tree_2.Cursor(right, this.cursor);
342
- this.targetCursor = otherWrapper ? new tree_2.Cursor(otherWrapper, this.targetCursor) : this.targetCursor;
343
- try {
344
- // Call visitProperty without propertyName to avoid pushing spurious 'element' path entries
345
- // The property context should be provided through visitRightPaddedProperty() if needed
346
- yield this.visitProperty(right.element, otherElement);
347
- }
348
- finally {
349
- this.cursor = savedCursor;
350
- this.targetCursor = savedTargetCursor;
351
- }
302
+ async visitRightPadded(right, p) {
303
+ if (!this.match)
352
304
  return right;
353
- });
305
+ // Extract the other element if it's also a RightPadded
306
+ const isRightPadded = p.kind === java_1.J.Kind.RightPadded;
307
+ const otherWrapper = isRightPadded ? p : undefined;
308
+ const otherElement = isRightPadded ? otherWrapper.element : p;
309
+ // Push wrappers onto both cursors, then compare only the elements, not markers or spacing
310
+ const savedCursor = this.cursor;
311
+ const savedTargetCursor = this.targetCursor;
312
+ this.cursor = new tree_2.Cursor(right, this.cursor);
313
+ this.targetCursor = otherWrapper ? new tree_2.Cursor(otherWrapper, this.targetCursor) : this.targetCursor;
314
+ try {
315
+ // Call visitProperty without propertyName to avoid pushing spurious 'element' path entries
316
+ // The property context should be provided through visitRightPaddedProperty() if needed
317
+ await this.visitProperty(right.element, otherElement);
318
+ }
319
+ finally {
320
+ this.cursor = savedCursor;
321
+ this.targetCursor = savedTargetCursor;
322
+ }
323
+ return right;
354
324
  }
355
325
  /**
356
326
  * Override visitLeftPadded to compare only the elements, not markers or spacing.
@@ -358,30 +328,28 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
358
328
  * Pushes the wrapper onto the cursor stack so captures can access it.
359
329
  * Also updates targetCursor in parallel.
360
330
  */
361
- visitLeftPadded(left, p) {
362
- return __awaiter(this, void 0, void 0, function* () {
363
- if (!this.match)
364
- return left;
365
- // Extract the other element if it's also a LeftPadded
366
- const isLeftPadded = p.kind === java_1.J.Kind.LeftPadded;
367
- const otherWrapper = isLeftPadded ? p : undefined;
368
- const otherElement = isLeftPadded ? otherWrapper.element : p;
369
- // Push wrappers onto both cursors, then compare only the elements, not markers or spacing
370
- const savedCursor = this.cursor;
371
- const savedTargetCursor = this.targetCursor;
372
- this.cursor = new tree_2.Cursor(left, this.cursor);
373
- this.targetCursor = otherWrapper ? new tree_2.Cursor(otherWrapper, this.targetCursor) : this.targetCursor;
374
- try {
375
- // Call visitProperty without propertyName to avoid pushing spurious 'element' path entries
376
- // The property context should be provided through visitLeftPaddedProperty() if needed
377
- yield this.visitProperty(left.element, otherElement);
378
- }
379
- finally {
380
- this.cursor = savedCursor;
381
- this.targetCursor = savedTargetCursor;
382
- }
331
+ async visitLeftPadded(left, p) {
332
+ if (!this.match)
383
333
  return left;
384
- });
334
+ // Extract the other element if it's also a LeftPadded
335
+ const isLeftPadded = p.kind === java_1.J.Kind.LeftPadded;
336
+ const otherWrapper = isLeftPadded ? p : undefined;
337
+ const otherElement = isLeftPadded ? otherWrapper.element : p;
338
+ // Push wrappers onto both cursors, then compare only the elements, not markers or spacing
339
+ const savedCursor = this.cursor;
340
+ const savedTargetCursor = this.targetCursor;
341
+ this.cursor = new tree_2.Cursor(left, this.cursor);
342
+ this.targetCursor = otherWrapper ? new tree_2.Cursor(otherWrapper, this.targetCursor) : this.targetCursor;
343
+ try {
344
+ // Call visitProperty without propertyName to avoid pushing spurious 'element' path entries
345
+ // The property context should be provided through visitLeftPaddedProperty() if needed
346
+ await this.visitProperty(left.element, otherElement);
347
+ }
348
+ finally {
349
+ this.cursor = savedCursor;
350
+ this.targetCursor = savedTargetCursor;
351
+ }
352
+ return left;
385
353
  }
386
354
  /**
387
355
  * Override visitContainer to compare only the elements, not markers or spacing.
@@ -389,36 +357,34 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
389
357
  * Pushes the wrapper onto the cursor stack so captures can access it.
390
358
  * Also updates targetCursor in parallel.
391
359
  */
392
- visitContainer(container, p) {
393
- return __awaiter(this, void 0, void 0, function* () {
394
- if (!this.match)
395
- return container;
396
- // Extract the other elements if it's also a Container
397
- const isContainer = p.kind === java_1.J.Kind.Container;
398
- const otherContainer = isContainer ? p : undefined;
399
- const otherElements = isContainer ? otherContainer.elements : p;
400
- // Compare elements array length
401
- if (container.elements.length !== otherElements.length) {
402
- return this.arrayLengthMismatch('elements');
403
- }
404
- // Push wrappers onto both cursors, then compare each element
405
- const savedCursor = this.cursor;
406
- const savedTargetCursor = this.targetCursor;
407
- this.cursor = new tree_2.Cursor(container, this.cursor);
408
- this.targetCursor = otherContainer ? new tree_2.Cursor(otherContainer, this.targetCursor) : this.targetCursor;
409
- try {
410
- for (let i = 0; i < container.elements.length; i++) {
411
- yield this.visitProperty(container.elements[i], otherElements[i]);
412
- if (!this.match)
413
- return container;
414
- }
415
- }
416
- finally {
417
- this.cursor = savedCursor;
418
- this.targetCursor = savedTargetCursor;
419
- }
360
+ async visitContainer(container, p) {
361
+ if (!this.match)
420
362
  return container;
421
- });
363
+ // Extract the other elements if it's also a Container
364
+ const isContainer = p.kind === java_1.J.Kind.Container;
365
+ const otherContainer = isContainer ? p : undefined;
366
+ const otherElements = isContainer ? otherContainer.elements : p;
367
+ // Compare elements array length
368
+ if (container.elements.length !== otherElements.length) {
369
+ return this.arrayLengthMismatch('elements');
370
+ }
371
+ // Push wrappers onto both cursors, then compare each element
372
+ const savedCursor = this.cursor;
373
+ const savedTargetCursor = this.targetCursor;
374
+ this.cursor = new tree_2.Cursor(container, this.cursor);
375
+ this.targetCursor = otherContainer ? new tree_2.Cursor(otherContainer, this.targetCursor) : this.targetCursor;
376
+ try {
377
+ for (let i = 0; i < container.elements.length; i++) {
378
+ await this.visitProperty(container.elements[i], otherElements[i]);
379
+ if (!this.match)
380
+ return container;
381
+ }
382
+ }
383
+ finally {
384
+ this.cursor = savedCursor;
385
+ this.targetCursor = savedTargetCursor;
386
+ }
387
+ return container;
422
388
  }
423
389
  /**
424
390
  * Overrides the visitBinary method to compare binary expressions.
@@ -427,10 +393,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
427
393
  * @param other The other binary expression to compare with
428
394
  * @returns The visited binary expression, or undefined if the visit was aborted
429
395
  */
430
- visitBinary(binary, other) {
431
- return __awaiter(this, void 0, void 0, function* () {
432
- return this.visitElement(binary, other);
433
- });
396
+ async visitBinary(binary, other) {
397
+ return this.visitElement(binary, other);
434
398
  }
435
399
  /**
436
400
  * Overrides the visitIdentifier method to compare identifiers.
@@ -439,10 +403,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
439
403
  * @param other The other identifier to compare with
440
404
  * @returns The visited identifier, or undefined if the visit was aborted
441
405
  */
442
- visitIdentifier(identifier, other) {
443
- return __awaiter(this, void 0, void 0, function* () {
444
- return this.visitElement(identifier, other);
445
- });
406
+ async visitIdentifier(identifier, other) {
407
+ return this.visitElement(identifier, other);
446
408
  }
447
409
  /**
448
410
  * Overrides the visitLiteral method to compare literals.
@@ -451,10 +413,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
451
413
  * @param other The other literal to compare with
452
414
  * @returns The visited literal, or undefined if the visit was aborted
453
415
  */
454
- visitLiteral(literal, other) {
455
- return __awaiter(this, void 0, void 0, function* () {
456
- return this.visitElement(literal, other);
457
- });
416
+ async visitLiteral(literal, other) {
417
+ return this.visitElement(literal, other);
458
418
  }
459
419
  /**
460
420
  * Overrides the visitBlock method to compare blocks.
@@ -463,10 +423,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
463
423
  * @param other The other block to compare with
464
424
  * @returns The visited block, or undefined if the visit was aborted
465
425
  */
466
- visitBlock(block, other) {
467
- return __awaiter(this, void 0, void 0, function* () {
468
- return this.visitElement(block, other);
469
- });
426
+ async visitBlock(block, other) {
427
+ return this.visitElement(block, other);
470
428
  }
471
429
  /**
472
430
  * Overrides the visitJsCompilationUnit method to compare compilation units.
@@ -475,10 +433,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
475
433
  * @param other The other compilation unit to compare with
476
434
  * @returns The visited compilation unit, or undefined if the visit was aborted
477
435
  */
478
- visitJsCompilationUnit(compilationUnit, other) {
479
- return __awaiter(this, void 0, void 0, function* () {
480
- return this.visitElement(compilationUnit, other);
481
- });
436
+ async visitJsCompilationUnit(compilationUnit, other) {
437
+ return this.visitElement(compilationUnit, other);
482
438
  }
483
439
  /**
484
440
  * Overrides the visitAlias method to compare aliases.
@@ -487,10 +443,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
487
443
  * @param other The other alias to compare with
488
444
  * @returns The visited alias, or undefined if the visit was aborted
489
445
  */
490
- visitAlias(alias, other) {
491
- return __awaiter(this, void 0, void 0, function* () {
492
- return this.visitElement(alias, other);
493
- });
446
+ async visitAlias(alias, other) {
447
+ return this.visitElement(alias, other);
494
448
  }
495
449
  /**
496
450
  * Overrides the visitArrowFunction method to compare arrow functions.
@@ -499,10 +453,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
499
453
  * @param other The other arrow function to compare with
500
454
  * @returns The visited arrow function, or undefined if the visit was aborted
501
455
  */
502
- visitArrowFunction(arrowFunction, other) {
503
- return __awaiter(this, void 0, void 0, function* () {
504
- return this.visitElement(arrowFunction, other);
505
- });
456
+ async visitArrowFunction(arrowFunction, other) {
457
+ return this.visitElement(arrowFunction, other);
506
458
  }
507
459
  /**
508
460
  * Overrides the visitAwait method to compare await expressions.
@@ -511,10 +463,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
511
463
  * @param other The other await expression to compare with
512
464
  * @returns The visited await expression, or undefined if the visit was aborted
513
465
  */
514
- visitAwait(await_, other) {
515
- return __awaiter(this, void 0, void 0, function* () {
516
- return this.visitElement(await_, other);
517
- });
466
+ async visitAwait(await_, other) {
467
+ return this.visitElement(await_, other);
518
468
  }
519
469
  /**
520
470
  * Overrides the visitJsxTag method to compare JSX tags.
@@ -523,10 +473,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
523
473
  * @param other The other JSX tag to compare with
524
474
  * @returns The visited JSX tag, or undefined if the visit was aborted
525
475
  */
526
- visitJsxTag(element, other) {
527
- return __awaiter(this, void 0, void 0, function* () {
528
- return this.visitElement(element, other);
529
- });
476
+ async visitJsxTag(element, other) {
477
+ return this.visitElement(element, other);
530
478
  }
531
479
  /**
532
480
  * Overrides the visitJsxAttribute method to compare JSX attributes.
@@ -535,10 +483,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
535
483
  * @param other The other JSX attribute to compare with
536
484
  * @returns The visited JSX attribute, or undefined if the visit was aborted
537
485
  */
538
- visitJsxAttribute(attribute, other) {
539
- return __awaiter(this, void 0, void 0, function* () {
540
- return this.visitElement(attribute, other);
541
- });
486
+ async visitJsxAttribute(attribute, other) {
487
+ return this.visitElement(attribute, other);
542
488
  }
543
489
  /**
544
490
  * Overrides the visitJsxSpreadAttribute method to compare JSX spread attributes.
@@ -547,10 +493,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
547
493
  * @param other The other JSX spread attribute to compare with
548
494
  * @returns The visited JSX spread attribute, or undefined if the visit was aborted
549
495
  */
550
- visitJsxSpreadAttribute(spread, other) {
551
- return __awaiter(this, void 0, void 0, function* () {
552
- return this.visitElement(spread, other);
553
- });
496
+ async visitJsxSpreadAttribute(spread, other) {
497
+ return this.visitElement(spread, other);
554
498
  }
555
499
  /**
556
500
  * Overrides the visitJsxExpression method to compare JSX expressions.
@@ -559,10 +503,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
559
503
  * @param other The other JSX expression to compare with
560
504
  * @returns The visited JSX expression, or undefined if the visit was aborted
561
505
  */
562
- visitJsxEmbeddedExpression(expr, other) {
563
- return __awaiter(this, void 0, void 0, function* () {
564
- return this.visitElement(expr, other);
565
- });
506
+ async visitJsxEmbeddedExpression(expr, other) {
507
+ return this.visitElement(expr, other);
566
508
  }
567
509
  /**
568
510
  * Overrides the visitJsxNamespacedName method to compare JSX namespaced names.
@@ -571,10 +513,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
571
513
  * @param other The other JSX namespaced name to compare with
572
514
  * @returns The visited JSX namespaced name, or undefined if the visit was aborted
573
515
  */
574
- visitJsxNamespacedName(ns, other) {
575
- return __awaiter(this, void 0, void 0, function* () {
576
- return this.visitElement(ns, other);
577
- });
516
+ async visitJsxNamespacedName(ns, other) {
517
+ return this.visitElement(ns, other);
578
518
  }
579
519
  /**
580
520
  * Overrides the visitConditionalType method to compare conditional types.
@@ -583,10 +523,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
583
523
  * @param other The other conditional type to compare with
584
524
  * @returns The visited conditional type, or undefined if the visit was aborted
585
525
  */
586
- visitConditionalType(conditionalType, other) {
587
- return __awaiter(this, void 0, void 0, function* () {
588
- return this.visitElement(conditionalType, other);
589
- });
526
+ async visitConditionalType(conditionalType, other) {
527
+ return this.visitElement(conditionalType, other);
590
528
  }
591
529
  /**
592
530
  * Overrides the visitDelete method to compare delete expressions.
@@ -595,10 +533,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
595
533
  * @param other The other delete expression to compare with
596
534
  * @returns The visited delete expression, or undefined if the visit was aborted
597
535
  */
598
- visitDelete(delete_, other) {
599
- return __awaiter(this, void 0, void 0, function* () {
600
- return this.visitElement(delete_, other);
601
- });
536
+ async visitDelete(delete_, other) {
537
+ return this.visitElement(delete_, other);
602
538
  }
603
539
  /**
604
540
  * Overrides the visitExpressionStatement method to compare expression statements.
@@ -607,10 +543,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
607
543
  * @param other The other expression statement to compare with
608
544
  * @returns The visited expression statement, or undefined if the visit was aborted
609
545
  */
610
- visitExpressionStatement(expressionStatement, other) {
611
- return __awaiter(this, void 0, void 0, function* () {
612
- return this.visitElement(expressionStatement, other);
613
- });
546
+ async visitExpressionStatement(expressionStatement, other) {
547
+ return this.visitElement(expressionStatement, other);
614
548
  }
615
549
  /**
616
550
  * Overrides the visitExpressionWithTypeArguments method to compare expressions with type arguments.
@@ -619,10 +553,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
619
553
  * @param other The other expression with type arguments to compare with
620
554
  * @returns The visited expression with type arguments, or undefined if the visit was aborted
621
555
  */
622
- visitExpressionWithTypeArguments(expressionWithTypeArguments, other) {
623
- return __awaiter(this, void 0, void 0, function* () {
624
- return this.visitElement(expressionWithTypeArguments, other);
625
- });
556
+ async visitExpressionWithTypeArguments(expressionWithTypeArguments, other) {
557
+ return this.visitElement(expressionWithTypeArguments, other);
626
558
  }
627
559
  /**
628
560
  * Overrides the visitFunctionCall method to compare method invocations.
@@ -631,10 +563,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
631
563
  * @param other The other function call to compare with
632
564
  * @returns The visited function call, or undefined if the visit was aborted
633
565
  */
634
- visitFunctionCall(functionCall, other) {
635
- return __awaiter(this, void 0, void 0, function* () {
636
- return this.visitElement(functionCall, other);
637
- });
566
+ async visitFunctionCall(functionCall, other) {
567
+ return this.visitElement(functionCall, other);
638
568
  }
639
569
  /**
640
570
  * Overrides the visitFunctionType method to compare function types.
@@ -643,10 +573,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
643
573
  * @param other The other function type to compare with
644
574
  * @returns The visited function type, or undefined if the visit was aborted
645
575
  */
646
- visitFunctionType(functionType, other) {
647
- return __awaiter(this, void 0, void 0, function* () {
648
- return this.visitElement(functionType, other);
649
- });
576
+ async visitFunctionType(functionType, other) {
577
+ return this.visitElement(functionType, other);
650
578
  }
651
579
  /**
652
580
  * Overrides the visitInferType method to compare infer types.
@@ -655,10 +583,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
655
583
  * @param other The other infer type to compare with
656
584
  * @returns The visited infer type, or undefined if the visit was aborted
657
585
  */
658
- visitInferType(inferType, other) {
659
- return __awaiter(this, void 0, void 0, function* () {
660
- return this.visitElement(inferType, other);
661
- });
586
+ async visitInferType(inferType, other) {
587
+ return this.visitElement(inferType, other);
662
588
  }
663
589
  /**
664
590
  * Overrides the visitImportType method to compare import types.
@@ -667,10 +593,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
667
593
  * @param other The other import type to compare with
668
594
  * @returns The visited import type, or undefined if the visit was aborted
669
595
  */
670
- visitImportType(importType, other) {
671
- return __awaiter(this, void 0, void 0, function* () {
672
- return this.visitElement(importType, other);
673
- });
596
+ async visitImportType(importType, other) {
597
+ return this.visitElement(importType, other);
674
598
  }
675
599
  /**
676
600
  * Overrides the visitImportDeclaration method to compare import declarations.
@@ -679,10 +603,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
679
603
  * @param other The other import declaration to compare with
680
604
  * @returns The visited import declaration, or undefined if the visit was aborted
681
605
  */
682
- visitImportDeclaration(jsImport, other) {
683
- return __awaiter(this, void 0, void 0, function* () {
684
- return this.visitElement(jsImport, other);
685
- });
606
+ async visitImportDeclaration(jsImport, other) {
607
+ return this.visitElement(jsImport, other);
686
608
  }
687
609
  /**
688
610
  * Overrides the visitImportClause method to compare import clauses.
@@ -691,10 +613,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
691
613
  * @param other The other import clause to compare with
692
614
  * @returns The visited import clause, or undefined if the visit was aborted
693
615
  */
694
- visitImportClause(importClause, other) {
695
- return __awaiter(this, void 0, void 0, function* () {
696
- return this.visitElement(importClause, other);
697
- });
616
+ async visitImportClause(importClause, other) {
617
+ return this.visitElement(importClause, other);
698
618
  }
699
619
  /**
700
620
  * Overrides the visitNamedImports method to compare named imports.
@@ -703,10 +623,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
703
623
  * @param other The other named imports to compare with
704
624
  * @returns The visited named imports, or undefined if the visit was aborted
705
625
  */
706
- visitNamedImports(namedImports, other) {
707
- return __awaiter(this, void 0, void 0, function* () {
708
- return this.visitElement(namedImports, other);
709
- });
626
+ async visitNamedImports(namedImports, other) {
627
+ return this.visitElement(namedImports, other);
710
628
  }
711
629
  /**
712
630
  * Overrides the visitImportSpecifier method to compare import specifiers.
@@ -715,10 +633,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
715
633
  * @param other The other import specifier to compare with
716
634
  * @returns The visited import specifier, or undefined if the visit was aborted
717
635
  */
718
- visitImportSpecifier(importSpecifier, other) {
719
- return __awaiter(this, void 0, void 0, function* () {
720
- return this.visitElement(importSpecifier, other);
721
- });
636
+ async visitImportSpecifier(importSpecifier, other) {
637
+ return this.visitElement(importSpecifier, other);
722
638
  }
723
639
  /**
724
640
  * Overrides the visitImportAttributes method to compare import attributes.
@@ -727,10 +643,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
727
643
  * @param other The other import attributes to compare with
728
644
  * @returns The visited import attributes, or undefined if the visit was aborted
729
645
  */
730
- visitImportAttributes(importAttributes, other) {
731
- return __awaiter(this, void 0, void 0, function* () {
732
- return this.visitElement(importAttributes, other);
733
- });
646
+ async visitImportAttributes(importAttributes, other) {
647
+ return this.visitElement(importAttributes, other);
734
648
  }
735
649
  /**
736
650
  * Overrides the visitImportTypeAttributes method to compare import type attributes.
@@ -739,10 +653,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
739
653
  * @param other The other import type attributes to compare with
740
654
  * @returns The visited import type attributes, or undefined if the visit was aborted
741
655
  */
742
- visitImportTypeAttributes(importTypeAttributes, other) {
743
- return __awaiter(this, void 0, void 0, function* () {
744
- return this.visitElement(importTypeAttributes, other);
745
- });
656
+ async visitImportTypeAttributes(importTypeAttributes, other) {
657
+ return this.visitElement(importTypeAttributes, other);
746
658
  }
747
659
  /**
748
660
  * Overrides the visitImportAttribute method to compare import attributes.
@@ -751,10 +663,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
751
663
  * @param other The other import attribute to compare with
752
664
  * @returns The visited import attribute, or undefined if the visit was aborted
753
665
  */
754
- visitImportAttribute(importAttribute, other) {
755
- return __awaiter(this, void 0, void 0, function* () {
756
- return this.visitElement(importAttribute, other);
757
- });
666
+ async visitImportAttribute(importAttribute, other) {
667
+ return this.visitElement(importAttribute, other);
758
668
  }
759
669
  /**
760
670
  * Overrides the visitBinaryExtensions method to compare binary expressions.
@@ -763,10 +673,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
763
673
  * @param other The other binary expression to compare with
764
674
  * @returns The visited binary expression, or undefined if the visit was aborted
765
675
  */
766
- visitBinaryExtensions(jsBinary, other) {
767
- return __awaiter(this, void 0, void 0, function* () {
768
- return this.visitElement(jsBinary, other);
769
- });
676
+ async visitBinaryExtensions(jsBinary, other) {
677
+ return this.visitElement(jsBinary, other);
770
678
  }
771
679
  /**
772
680
  * Overrides the visitLiteralType method to compare literal types.
@@ -775,10 +683,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
775
683
  * @param other The other literal type to compare with
776
684
  * @returns The visited literal type, or undefined if the visit was aborted
777
685
  */
778
- visitLiteralType(literalType, other) {
779
- return __awaiter(this, void 0, void 0, function* () {
780
- return this.visitElement(literalType, other);
781
- });
686
+ async visitLiteralType(literalType, other) {
687
+ return this.visitElement(literalType, other);
782
688
  }
783
689
  /**
784
690
  * Overrides the visitMappedType method to compare mapped types.
@@ -787,10 +693,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
787
693
  * @param other The other mapped type to compare with
788
694
  * @returns The visited mapped type, or undefined if the visit was aborted
789
695
  */
790
- visitMappedType(mappedType, other) {
791
- return __awaiter(this, void 0, void 0, function* () {
792
- return this.visitElement(mappedType, other);
793
- });
696
+ async visitMappedType(mappedType, other) {
697
+ return this.visitElement(mappedType, other);
794
698
  }
795
699
  /**
796
700
  * Overrides the visitKeysRemapping method to compare keys remapping.
@@ -799,10 +703,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
799
703
  * @param other The other keys remapping to compare with
800
704
  * @returns The visited keys remapping, or undefined if the visit was aborted
801
705
  */
802
- visitMappedTypeKeysRemapping(keysRemapping, other) {
803
- return __awaiter(this, void 0, void 0, function* () {
804
- return this.visitElement(keysRemapping, other);
805
- });
706
+ async visitMappedTypeKeysRemapping(keysRemapping, other) {
707
+ return this.visitElement(keysRemapping, other);
806
708
  }
807
709
  /**
808
710
  * Overrides the visitMappedTypeParameter method to compare mapped type parameters.
@@ -811,10 +713,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
811
713
  * @param other The other mapped type parameter to compare with
812
714
  * @returns The visited mapped type parameter, or undefined if the visit was aborted
813
715
  */
814
- visitMappedTypeParameter(mappedTypeParameter, other) {
815
- return __awaiter(this, void 0, void 0, function* () {
816
- return this.visitElement(mappedTypeParameter, other);
817
- });
716
+ async visitMappedTypeParameter(mappedTypeParameter, other) {
717
+ return this.visitElement(mappedTypeParameter, other);
818
718
  }
819
719
  /**
820
720
  * Overrides the visitObjectBindingPattern method to compare object binding declarations.
@@ -823,10 +723,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
823
723
  * @param other The other object binding declarations to compare with
824
724
  * @returns The visited object binding declarations, or undefined if the visit was aborted
825
725
  */
826
- visitObjectBindingPattern(objectBindingPattern, other) {
827
- return __awaiter(this, void 0, void 0, function* () {
828
- return this.visitElement(objectBindingPattern, other);
829
- });
726
+ async visitObjectBindingPattern(objectBindingPattern, other) {
727
+ return this.visitElement(objectBindingPattern, other);
830
728
  }
831
729
  /**
832
730
  * Overrides the visitPropertyAssignment method to compare property assignments.
@@ -835,10 +733,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
835
733
  * @param other The other property assignment to compare with
836
734
  * @returns The visited property assignment, or undefined if the visit was aborted
837
735
  */
838
- visitPropertyAssignment(propertyAssignment, other) {
839
- return __awaiter(this, void 0, void 0, function* () {
840
- return this.visitElement(propertyAssignment, other);
841
- });
736
+ async visitPropertyAssignment(propertyAssignment, other) {
737
+ return this.visitElement(propertyAssignment, other);
842
738
  }
843
739
  /**
844
740
  * Overrides the visitSatisfiesExpression method to compare satisfies expressions.
@@ -847,10 +743,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
847
743
  * @param other The other satisfies expression to compare with
848
744
  * @returns The visited satisfies expression, or undefined if the visit was aborted
849
745
  */
850
- visitSatisfiesExpression(satisfiesExpression, other) {
851
- return __awaiter(this, void 0, void 0, function* () {
852
- return this.visitElement(satisfiesExpression, other);
853
- });
746
+ async visitSatisfiesExpression(satisfiesExpression, other) {
747
+ return this.visitElement(satisfiesExpression, other);
854
748
  }
855
749
  /**
856
750
  * Overrides the visitScopedVariableDeclarations method to compare scoped variable declarations.
@@ -859,10 +753,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
859
753
  * @param other The other scoped variable declarations to compare with
860
754
  * @returns The visited scoped variable declarations, or undefined if the visit was aborted
861
755
  */
862
- visitScopedVariableDeclarations(scopedVariableDeclarations, other) {
863
- return __awaiter(this, void 0, void 0, function* () {
864
- return this.visitElement(scopedVariableDeclarations, other);
865
- });
756
+ async visitScopedVariableDeclarations(scopedVariableDeclarations, other) {
757
+ return this.visitElement(scopedVariableDeclarations, other);
866
758
  }
867
759
  /**
868
760
  * Overrides the visitShebang method to compare shebangs.
@@ -871,10 +763,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
871
763
  * @param other The other shebang to compare with
872
764
  * @returns The visited shebang, or undefined if the visit was aborted
873
765
  */
874
- visitShebang(shebang, other) {
875
- return __awaiter(this, void 0, void 0, function* () {
876
- return this.visitElement(shebang, other);
877
- });
766
+ async visitShebang(shebang, other) {
767
+ return this.visitElement(shebang, other);
878
768
  }
879
769
  /**
880
770
  * Overrides the visitSpread method to compare spread expressions.
@@ -883,10 +773,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
883
773
  * @param other The other spread expression to compare with
884
774
  * @returns The visited spread expression, or undefined if the visit was aborted
885
775
  */
886
- visitSpread(spread, other) {
887
- return __awaiter(this, void 0, void 0, function* () {
888
- return this.visitElement(spread, other);
889
- });
776
+ async visitSpread(spread, other) {
777
+ return this.visitElement(spread, other);
890
778
  }
891
779
  /**
892
780
  * Overrides the visitStatementExpression method to compare statement expressions.
@@ -895,10 +783,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
895
783
  * @param other The other statement expression to compare with
896
784
  * @returns The visited statement expression, or undefined if the visit was aborted
897
785
  */
898
- visitStatementExpression(statementExpression, other) {
899
- return __awaiter(this, void 0, void 0, function* () {
900
- return this.visitElement(statementExpression, other);
901
- });
786
+ async visitStatementExpression(statementExpression, other) {
787
+ return this.visitElement(statementExpression, other);
902
788
  }
903
789
  /**
904
790
  * Overrides the visitTaggedTemplateExpression method to compare tagged template expressions.
@@ -907,10 +793,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
907
793
  * @param other The other tagged template expression to compare with
908
794
  * @returns The visited tagged template expression, or undefined if the visit was aborted
909
795
  */
910
- visitTaggedTemplateExpression(taggedTemplateExpression, other) {
911
- return __awaiter(this, void 0, void 0, function* () {
912
- return this.visitElement(taggedTemplateExpression, other);
913
- });
796
+ async visitTaggedTemplateExpression(taggedTemplateExpression, other) {
797
+ return this.visitElement(taggedTemplateExpression, other);
914
798
  }
915
799
  /**
916
800
  * Overrides the visitTemplateExpression method to compare template expressions.
@@ -919,10 +803,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
919
803
  * @param other The other template expression to compare with
920
804
  * @returns The visited template expression, or undefined if the visit was aborted
921
805
  */
922
- visitTemplateExpression(templateExpression, other) {
923
- return __awaiter(this, void 0, void 0, function* () {
924
- return this.visitElement(templateExpression, other);
925
- });
806
+ async visitTemplateExpression(templateExpression, other) {
807
+ return this.visitElement(templateExpression, other);
926
808
  }
927
809
  /**
928
810
  * Overrides the visitTemplateExpressionSpan method to compare template expression spans.
@@ -931,10 +813,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
931
813
  * @param other The other template expression span to compare with
932
814
  * @returns The visited template expression span, or undefined if the visit was aborted
933
815
  */
934
- visitTemplateExpressionSpan(span, other) {
935
- return __awaiter(this, void 0, void 0, function* () {
936
- return this.visitElement(span, other);
937
- });
816
+ async visitTemplateExpressionSpan(span, other) {
817
+ return this.visitElement(span, other);
938
818
  }
939
819
  /**
940
820
  * Overrides the visitTuple method to compare tuples.
@@ -943,10 +823,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
943
823
  * @param other The other tuple to compare with
944
824
  * @returns The visited tuple, or undefined if the visit was aborted
945
825
  */
946
- visitTuple(tuple, other) {
947
- return __awaiter(this, void 0, void 0, function* () {
948
- return this.visitElement(tuple, other);
949
- });
826
+ async visitTuple(tuple, other) {
827
+ return this.visitElement(tuple, other);
950
828
  }
951
829
  /**
952
830
  * Overrides the visitTypeDeclaration method to compare type declarations.
@@ -955,10 +833,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
955
833
  * @param other The other type declaration to compare with
956
834
  * @returns The visited type declaration, or undefined if the visit was aborted
957
835
  */
958
- visitTypeDeclaration(typeDeclaration, other) {
959
- return __awaiter(this, void 0, void 0, function* () {
960
- return this.visitElement(typeDeclaration, other);
961
- });
836
+ async visitTypeDeclaration(typeDeclaration, other) {
837
+ return this.visitElement(typeDeclaration, other);
962
838
  }
963
839
  /**
964
840
  * Overrides the visitTypeOf method to compare typeof expressions.
@@ -967,10 +843,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
967
843
  * @param other The other typeof expression to compare with
968
844
  * @returns The visited typeof expression, or undefined if the visit was aborted
969
845
  */
970
- visitTypeOf(typeOf, other) {
971
- return __awaiter(this, void 0, void 0, function* () {
972
- return this.visitElement(typeOf, other);
973
- });
846
+ async visitTypeOf(typeOf, other) {
847
+ return this.visitElement(typeOf, other);
974
848
  }
975
849
  /**
976
850
  * Overrides the visitTypeTreeExpression method to compare type tree expressions.
@@ -979,10 +853,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
979
853
  * @param other The other type tree expression to compare with
980
854
  * @returns The visited type tree expression, or undefined if the visit was aborted
981
855
  */
982
- visitTypeTreeExpression(typeTreeExpression, other) {
983
- return __awaiter(this, void 0, void 0, function* () {
984
- return this.visitElement(typeTreeExpression, other);
985
- });
856
+ async visitTypeTreeExpression(typeTreeExpression, other) {
857
+ return this.visitElement(typeTreeExpression, other);
986
858
  }
987
859
  /**
988
860
  * Overrides the visitAs method to compare as expressions.
@@ -991,10 +863,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
991
863
  * @param other The other as expression to compare with
992
864
  * @returns The visited as expression, or undefined if the visit was aborted
993
865
  */
994
- visitAs(as_, other) {
995
- return __awaiter(this, void 0, void 0, function* () {
996
- return this.visitElement(as_, other);
997
- });
866
+ async visitAs(as_, other) {
867
+ return this.visitElement(as_, other);
998
868
  }
999
869
  /**
1000
870
  * Overrides the visitAssignmentOperationExtensions method to compare assignment operations.
@@ -1003,10 +873,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1003
873
  * @param other The other assignment operation to compare with
1004
874
  * @returns The visited assignment operation, or undefined if the visit was aborted
1005
875
  */
1006
- visitAssignmentOperationExtensions(assignmentOperation, other) {
1007
- return __awaiter(this, void 0, void 0, function* () {
1008
- return this.visitElement(assignmentOperation, other);
1009
- });
876
+ async visitAssignmentOperationExtensions(assignmentOperation, other) {
877
+ return this.visitElement(assignmentOperation, other);
1010
878
  }
1011
879
  /**
1012
880
  * Overrides the visitIndexedAccessType method to compare indexed access types.
@@ -1015,10 +883,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1015
883
  * @param other The other indexed access type to compare with
1016
884
  * @returns The visited indexed access type, or undefined if the visit was aborted
1017
885
  */
1018
- visitIndexedAccessType(indexedAccessType, other) {
1019
- return __awaiter(this, void 0, void 0, function* () {
1020
- return this.visitElement(indexedAccessType, other);
1021
- });
886
+ async visitIndexedAccessType(indexedAccessType, other) {
887
+ return this.visitElement(indexedAccessType, other);
1022
888
  }
1023
889
  /**
1024
890
  * Overrides the visitIndexType method to compare index types.
@@ -1027,10 +893,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1027
893
  * @param other The other index type to compare with
1028
894
  * @returns The visited index type, or undefined if the visit was aborted
1029
895
  */
1030
- visitIndexedAccessTypeIndexType(indexType, other) {
1031
- return __awaiter(this, void 0, void 0, function* () {
1032
- return this.visitElement(indexType, other);
1033
- });
896
+ async visitIndexedAccessTypeIndexType(indexType, other) {
897
+ return this.visitElement(indexType, other);
1034
898
  }
1035
899
  /**
1036
900
  * Overrides the visitTypeQuery method to compare type queries.
@@ -1039,10 +903,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1039
903
  * @param other The other type query to compare with
1040
904
  * @returns The visited type query, or undefined if the visit was aborted
1041
905
  */
1042
- visitTypeQuery(typeQuery, other) {
1043
- return __awaiter(this, void 0, void 0, function* () {
1044
- return this.visitElement(typeQuery, other);
1045
- });
906
+ async visitTypeQuery(typeQuery, other) {
907
+ return this.visitElement(typeQuery, other);
1046
908
  }
1047
909
  /**
1048
910
  * Overrides the visitTypeInfo method to compare type info.
@@ -1051,10 +913,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1051
913
  * @param other The other type info to compare with
1052
914
  * @returns The visited type info, or undefined if the visit was aborted
1053
915
  */
1054
- visitTypeInfo(typeInfo, other) {
1055
- return __awaiter(this, void 0, void 0, function* () {
1056
- return this.visitElement(typeInfo, other);
1057
- });
916
+ async visitTypeInfo(typeInfo, other) {
917
+ return this.visitElement(typeInfo, other);
1058
918
  }
1059
919
  /**
1060
920
  * Overrides the visitComputedPropertyName method to compare computed property names.
@@ -1063,10 +923,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1063
923
  * @param other The other computed property name to compare with
1064
924
  * @returns The visited computed property name, or undefined if the visit was aborted
1065
925
  */
1066
- visitComputedPropertyName(computedPropertyName, other) {
1067
- return __awaiter(this, void 0, void 0, function* () {
1068
- return this.visitElement(computedPropertyName, other);
1069
- });
926
+ async visitComputedPropertyName(computedPropertyName, other) {
927
+ return this.visitElement(computedPropertyName, other);
1070
928
  }
1071
929
  /**
1072
930
  * Overrides the visitTypeOperator method to compare type operators.
@@ -1075,10 +933,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1075
933
  * @param other The other type operator to compare with
1076
934
  * @returns The visited type operator, or undefined if the visit was aborted
1077
935
  */
1078
- visitTypeOperator(typeOperator, other) {
1079
- return __awaiter(this, void 0, void 0, function* () {
1080
- return this.visitElement(typeOperator, other);
1081
- });
936
+ async visitTypeOperator(typeOperator, other) {
937
+ return this.visitElement(typeOperator, other);
1082
938
  }
1083
939
  /**
1084
940
  * Overrides the visitTypePredicate method to compare type predicates.
@@ -1087,10 +943,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1087
943
  * @param other The other type predicate to compare with
1088
944
  * @returns The visited type predicate, or undefined if the visit was aborted
1089
945
  */
1090
- visitTypePredicate(typePredicate, other) {
1091
- return __awaiter(this, void 0, void 0, function* () {
1092
- return this.visitElement(typePredicate, other);
1093
- });
946
+ async visitTypePredicate(typePredicate, other) {
947
+ return this.visitElement(typePredicate, other);
1094
948
  }
1095
949
  /**
1096
950
  * Overrides the visitUnion method to compare unions.
@@ -1099,10 +953,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1099
953
  * @param other The other union to compare with
1100
954
  * @returns The visited union, or undefined if the visit was aborted
1101
955
  */
1102
- visitUnion(union, other) {
1103
- return __awaiter(this, void 0, void 0, function* () {
1104
- return this.visitElement(union, other);
1105
- });
956
+ async visitUnion(union, other) {
957
+ return this.visitElement(union, other);
1106
958
  }
1107
959
  /**
1108
960
  * Overrides the visitIntersection method to compare intersections.
@@ -1111,10 +963,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1111
963
  * @param other The other intersection to compare with
1112
964
  * @returns The visited intersection, or undefined if the visit was aborted
1113
965
  */
1114
- visitIntersection(intersection, other) {
1115
- return __awaiter(this, void 0, void 0, function* () {
1116
- return this.visitElement(intersection, other);
1117
- });
966
+ async visitIntersection(intersection, other) {
967
+ return this.visitElement(intersection, other);
1118
968
  }
1119
969
  /**
1120
970
  * Overrides the visitAnnotatedType method to compare annotated types.
@@ -1123,10 +973,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1123
973
  * @param other The other annotated type to compare with
1124
974
  * @returns The visited annotated type, or undefined if the visit was aborted
1125
975
  */
1126
- visitAnnotatedType(annotatedType, other) {
1127
- return __awaiter(this, void 0, void 0, function* () {
1128
- return this.visitElement(annotatedType, other);
1129
- });
976
+ async visitAnnotatedType(annotatedType, other) {
977
+ return this.visitElement(annotatedType, other);
1130
978
  }
1131
979
  /**
1132
980
  * Overrides the visitAnnotation method to compare annotations.
@@ -1135,10 +983,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1135
983
  * @param other The other annotation to compare with
1136
984
  * @returns The visited annotation, or undefined if the visit was aborted
1137
985
  */
1138
- visitAnnotation(annotation, other) {
1139
- return __awaiter(this, void 0, void 0, function* () {
1140
- return this.visitElement(annotation, other);
1141
- });
986
+ async visitAnnotation(annotation, other) {
987
+ return this.visitElement(annotation, other);
1142
988
  }
1143
989
  /**
1144
990
  * Overrides the visitArrayAccess method to compare array access expressions.
@@ -1147,10 +993,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1147
993
  * @param other The other array access expression to compare with
1148
994
  * @returns The visited array access expression, or undefined if the visit was aborted
1149
995
  */
1150
- visitArrayAccess(arrayAccess, other) {
1151
- return __awaiter(this, void 0, void 0, function* () {
1152
- return this.visitElement(arrayAccess, other);
1153
- });
996
+ async visitArrayAccess(arrayAccess, other) {
997
+ return this.visitElement(arrayAccess, other);
1154
998
  }
1155
999
  /**
1156
1000
  * Overrides the visitArrayDimension method to compare array dimensions.
@@ -1159,10 +1003,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1159
1003
  * @param other The other array dimension to compare with
1160
1004
  * @returns The visited array dimension, or undefined if the visit was aborted
1161
1005
  */
1162
- visitArrayDimension(arrayDimension, other) {
1163
- return __awaiter(this, void 0, void 0, function* () {
1164
- return this.visitElement(arrayDimension, other);
1165
- });
1006
+ async visitArrayDimension(arrayDimension, other) {
1007
+ return this.visitElement(arrayDimension, other);
1166
1008
  }
1167
1009
  /**
1168
1010
  * Overrides the visitArrayType method to compare array types.
@@ -1171,10 +1013,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1171
1013
  * @param other The other array type to compare with
1172
1014
  * @returns The visited array type, or undefined if the visit was aborted
1173
1015
  */
1174
- visitArrayType(arrayType, other) {
1175
- return __awaiter(this, void 0, void 0, function* () {
1176
- return this.visitElement(arrayType, other);
1177
- });
1016
+ async visitArrayType(arrayType, other) {
1017
+ return this.visitElement(arrayType, other);
1178
1018
  }
1179
1019
  /**
1180
1020
  * Overrides the visitAssert method to compare assert statements.
@@ -1183,10 +1023,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1183
1023
  * @param other The other assert statement to compare with
1184
1024
  * @returns The visited assert statement, or undefined if the visit was aborted
1185
1025
  */
1186
- visitAssert(anAssert, other) {
1187
- return __awaiter(this, void 0, void 0, function* () {
1188
- return this.visitElement(anAssert, other);
1189
- });
1026
+ async visitAssert(anAssert, other) {
1027
+ return this.visitElement(anAssert, other);
1190
1028
  }
1191
1029
  /**
1192
1030
  * Overrides the visitAssignment method to compare assignment expressions.
@@ -1195,10 +1033,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1195
1033
  * @param other The other assignment expression to compare with
1196
1034
  * @returns The visited assignment expression, or undefined if the visit was aborted
1197
1035
  */
1198
- visitAssignment(assignment, other) {
1199
- return __awaiter(this, void 0, void 0, function* () {
1200
- return this.visitElement(assignment, other);
1201
- });
1036
+ async visitAssignment(assignment, other) {
1037
+ return this.visitElement(assignment, other);
1202
1038
  }
1203
1039
  /**
1204
1040
  * Overrides the visitAssignmentOperation method to compare assignment operation expressions.
@@ -1207,10 +1043,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1207
1043
  * @param other The other assignment operation expression to compare with
1208
1044
  * @returns The visited assignment operation expression, or undefined if the visit was aborted
1209
1045
  */
1210
- visitAssignmentOperation(assignOp, other) {
1211
- return __awaiter(this, void 0, void 0, function* () {
1212
- return this.visitElement(assignOp, other);
1213
- });
1046
+ async visitAssignmentOperation(assignOp, other) {
1047
+ return this.visitElement(assignOp, other);
1214
1048
  }
1215
1049
  /**
1216
1050
  * Overrides the visitBreak method to compare break statements.
@@ -1219,10 +1053,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1219
1053
  * @param other The other break statement to compare with
1220
1054
  * @returns The visited break statement, or undefined if the visit was aborted
1221
1055
  */
1222
- visitBreak(breakStatement, other) {
1223
- return __awaiter(this, void 0, void 0, function* () {
1224
- return this.visitElement(breakStatement, other);
1225
- });
1056
+ async visitBreak(breakStatement, other) {
1057
+ return this.visitElement(breakStatement, other);
1226
1058
  }
1227
1059
  /**
1228
1060
  * Overrides the visitCase method to compare case statements.
@@ -1231,10 +1063,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1231
1063
  * @param other The other case statement to compare with
1232
1064
  * @returns The visited case statement, or undefined if the visit was aborted
1233
1065
  */
1234
- visitCase(aCase, other) {
1235
- return __awaiter(this, void 0, void 0, function* () {
1236
- return this.visitElement(aCase, other);
1237
- });
1066
+ async visitCase(aCase, other) {
1067
+ return this.visitElement(aCase, other);
1238
1068
  }
1239
1069
  /**
1240
1070
  * Overrides the visitClassDeclaration method to compare class declarations.
@@ -1243,10 +1073,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1243
1073
  * @param other The other class declaration to compare with
1244
1074
  * @returns The visited class declaration, or undefined if the visit was aborted
1245
1075
  */
1246
- visitClassDeclaration(classDecl, other) {
1247
- return __awaiter(this, void 0, void 0, function* () {
1248
- return this.visitElement(classDecl, other);
1249
- });
1076
+ async visitClassDeclaration(classDecl, other) {
1077
+ return this.visitElement(classDecl, other);
1250
1078
  }
1251
1079
  /**
1252
1080
  * Overrides the visitClassDeclarationKind method to compare class declaration kinds.
@@ -1255,10 +1083,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1255
1083
  * @param other The other class declaration kind to compare with
1256
1084
  * @returns The visited class declaration kind, or undefined if the visit was aborted
1257
1085
  */
1258
- visitClassDeclarationKind(kind, other) {
1259
- return __awaiter(this, void 0, void 0, function* () {
1260
- return this.visitElement(kind, other);
1261
- });
1086
+ async visitClassDeclarationKind(kind, other) {
1087
+ return this.visitElement(kind, other);
1262
1088
  }
1263
1089
  /**
1264
1090
  * Overrides the visitCompilationUnit method to compare compilation units.
@@ -1267,10 +1093,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1267
1093
  * @param other The other compilation unit to compare with
1268
1094
  * @returns The visited compilation unit, or undefined if the visit was aborted
1269
1095
  */
1270
- visitCompilationUnit(compilationUnit, other) {
1271
- return __awaiter(this, void 0, void 0, function* () {
1272
- return this.visitElement(compilationUnit, other);
1273
- });
1096
+ async visitCompilationUnit(compilationUnit, other) {
1097
+ return this.visitElement(compilationUnit, other);
1274
1098
  }
1275
1099
  /**
1276
1100
  * Overrides the visitContinue method to compare continue statements.
@@ -1279,10 +1103,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1279
1103
  * @param other The other continue statement to compare with
1280
1104
  * @returns The visited continue statement, or undefined if the visit was aborted
1281
1105
  */
1282
- visitContinue(continueStatement, other) {
1283
- return __awaiter(this, void 0, void 0, function* () {
1284
- return this.visitElement(continueStatement, other);
1285
- });
1106
+ async visitContinue(continueStatement, other) {
1107
+ return this.visitElement(continueStatement, other);
1286
1108
  }
1287
1109
  /**
1288
1110
  * Overrides the visitControlParentheses method to compare control parentheses.
@@ -1291,10 +1113,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1291
1113
  * @param other The other control parentheses to compare with
1292
1114
  * @returns The visited control parentheses, or undefined if the visit was aborted
1293
1115
  */
1294
- visitControlParentheses(controlParens, other) {
1295
- return __awaiter(this, void 0, void 0, function* () {
1296
- return this.visitElement(controlParens, other);
1297
- });
1116
+ async visitControlParentheses(controlParens, other) {
1117
+ return this.visitElement(controlParens, other);
1298
1118
  }
1299
1119
  /**
1300
1120
  * Overrides the visitDeconstructionPattern method to compare deconstruction patterns.
@@ -1303,10 +1123,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1303
1123
  * @param other The other deconstruction pattern to compare with
1304
1124
  * @returns The visited deconstruction pattern, or undefined if the visit was aborted
1305
1125
  */
1306
- visitDeconstructionPattern(pattern, other) {
1307
- return __awaiter(this, void 0, void 0, function* () {
1308
- return this.visitElement(pattern, other);
1309
- });
1126
+ async visitDeconstructionPattern(pattern, other) {
1127
+ return this.visitElement(pattern, other);
1310
1128
  }
1311
1129
  /**
1312
1130
  * Overrides the visitDoWhileLoop method to compare do-while loops.
@@ -1315,10 +1133,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1315
1133
  * @param other The other do-while loop to compare with
1316
1134
  * @returns The visited do-while loop, or undefined if the visit was aborted
1317
1135
  */
1318
- visitDoWhileLoop(doWhileLoop, other) {
1319
- return __awaiter(this, void 0, void 0, function* () {
1320
- return this.visitElement(doWhileLoop, other);
1321
- });
1136
+ async visitDoWhileLoop(doWhileLoop, other) {
1137
+ return this.visitElement(doWhileLoop, other);
1322
1138
  }
1323
1139
  /**
1324
1140
  * Overrides the visitEmpty method to compare empty statements.
@@ -1327,10 +1143,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1327
1143
  * @param other The other empty statement to compare with
1328
1144
  * @returns The visited empty statement, or undefined if the visit was aborted
1329
1145
  */
1330
- visitEmpty(empty, other) {
1331
- return __awaiter(this, void 0, void 0, function* () {
1332
- return this.visitElement(empty, other);
1333
- });
1146
+ async visitEmpty(empty, other) {
1147
+ return this.visitElement(empty, other);
1334
1148
  }
1335
1149
  /**
1336
1150
  * Overrides the visitEnumValue method to compare enum values.
@@ -1339,10 +1153,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1339
1153
  * @param other The other enum value to compare with
1340
1154
  * @returns The visited enum value, or undefined if the visit was aborted
1341
1155
  */
1342
- visitEnumValue(enumValue, other) {
1343
- return __awaiter(this, void 0, void 0, function* () {
1344
- return this.visitElement(enumValue, other);
1345
- });
1156
+ async visitEnumValue(enumValue, other) {
1157
+ return this.visitElement(enumValue, other);
1346
1158
  }
1347
1159
  /**
1348
1160
  * Overrides the visitEnumValueSet method to compare enum value sets.
@@ -1351,10 +1163,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1351
1163
  * @param other The other enum value set to compare with
1352
1164
  * @returns The visited enum value set, or undefined if the visit was aborted
1353
1165
  */
1354
- visitEnumValueSet(enumValueSet, other) {
1355
- return __awaiter(this, void 0, void 0, function* () {
1356
- return this.visitElement(enumValueSet, other);
1357
- });
1166
+ async visitEnumValueSet(enumValueSet, other) {
1167
+ return this.visitElement(enumValueSet, other);
1358
1168
  }
1359
1169
  /**
1360
1170
  * Overrides the visitErroneous method to compare erroneous nodes.
@@ -1363,10 +1173,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1363
1173
  * @param other The other erroneous node to compare with
1364
1174
  * @returns The visited erroneous node, or undefined if the visit was aborted
1365
1175
  */
1366
- visitErroneous(erroneous, other) {
1367
- return __awaiter(this, void 0, void 0, function* () {
1368
- return this.visitElement(erroneous, other);
1369
- });
1176
+ async visitErroneous(erroneous, other) {
1177
+ return this.visitElement(erroneous, other);
1370
1178
  }
1371
1179
  /**
1372
1180
  * Overrides the visitFieldAccess method to compare field access expressions.
@@ -1375,10 +1183,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1375
1183
  * @param other The other field access expression to compare with
1376
1184
  * @returns The visited field access expression, or undefined if the visit was aborted
1377
1185
  */
1378
- visitFieldAccess(fieldAccess, other) {
1379
- return __awaiter(this, void 0, void 0, function* () {
1380
- return this.visitElement(fieldAccess, other);
1381
- });
1186
+ async visitFieldAccess(fieldAccess, other) {
1187
+ return this.visitElement(fieldAccess, other);
1382
1188
  }
1383
1189
  /**
1384
1190
  * Overrides the visitForEachLoop method to compare for-each loops.
@@ -1387,10 +1193,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1387
1193
  * @param other The other for-each loop to compare with
1388
1194
  * @returns The visited for-each loop, or undefined if the visit was aborted
1389
1195
  */
1390
- visitForEachLoop(forEachLoop, other) {
1391
- return __awaiter(this, void 0, void 0, function* () {
1392
- return this.visitElement(forEachLoop, other);
1393
- });
1196
+ async visitForEachLoop(forEachLoop, other) {
1197
+ return this.visitElement(forEachLoop, other);
1394
1198
  }
1395
1199
  /**
1396
1200
  * Overrides the visitForEachLoopControl method to compare for-each loop controls.
@@ -1399,10 +1203,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1399
1203
  * @param other The other for-each loop control to compare with
1400
1204
  * @returns The visited for-each loop control, or undefined if the visit was aborted
1401
1205
  */
1402
- visitForEachLoopControl(control, other) {
1403
- return __awaiter(this, void 0, void 0, function* () {
1404
- return this.visitElement(control, other);
1405
- });
1206
+ async visitForEachLoopControl(control, other) {
1207
+ return this.visitElement(control, other);
1406
1208
  }
1407
1209
  /**
1408
1210
  * Overrides the visitForLoop method to compare for loops.
@@ -1411,10 +1213,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1411
1213
  * @param other The other for loop to compare with
1412
1214
  * @returns The visited for loop, or undefined if the visit was aborted
1413
1215
  */
1414
- visitForLoop(forLoop, other) {
1415
- return __awaiter(this, void 0, void 0, function* () {
1416
- return this.visitElement(forLoop, other);
1417
- });
1216
+ async visitForLoop(forLoop, other) {
1217
+ return this.visitElement(forLoop, other);
1418
1218
  }
1419
1219
  /**
1420
1220
  * Overrides the visitForLoopControl method to compare for loop controls.
@@ -1423,10 +1223,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1423
1223
  * @param other The other for loop control to compare with
1424
1224
  * @returns The visited for loop control, or undefined if the visit was aborted
1425
1225
  */
1426
- visitForLoopControl(control, other) {
1427
- return __awaiter(this, void 0, void 0, function* () {
1428
- return this.visitElement(control, other);
1429
- });
1226
+ async visitForLoopControl(control, other) {
1227
+ return this.visitElement(control, other);
1430
1228
  }
1431
1229
  /**
1432
1230
  * Overrides the visitIf method to compare if statements.
@@ -1435,10 +1233,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1435
1233
  * @param other The other if statement to compare with
1436
1234
  * @returns The visited if statement, or undefined if the visit was aborted
1437
1235
  */
1438
- visitIf(ifStatement, other) {
1439
- return __awaiter(this, void 0, void 0, function* () {
1440
- return this.visitElement(ifStatement, other);
1441
- });
1236
+ async visitIf(ifStatement, other) {
1237
+ return this.visitElement(ifStatement, other);
1442
1238
  }
1443
1239
  /**
1444
1240
  * Overrides the visitElse method to compare else statements.
@@ -1447,10 +1243,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1447
1243
  * @param other The other else statement to compare with
1448
1244
  * @returns The visited else statement, or undefined if the visit was aborted
1449
1245
  */
1450
- visitElse(elseStatement, other) {
1451
- return __awaiter(this, void 0, void 0, function* () {
1452
- return this.visitElement(elseStatement, other);
1453
- });
1246
+ async visitElse(elseStatement, other) {
1247
+ return this.visitElement(elseStatement, other);
1454
1248
  }
1455
1249
  /**
1456
1250
  * Overrides the visitImport method to compare import statements.
@@ -1459,10 +1253,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1459
1253
  * @param other The other import statement to compare with
1460
1254
  * @returns The visited import statement, or undefined if the visit was aborted
1461
1255
  */
1462
- visitImport(importStatement, other) {
1463
- return __awaiter(this, void 0, void 0, function* () {
1464
- return this.visitElement(importStatement, other);
1465
- });
1256
+ async visitImport(importStatement, other) {
1257
+ return this.visitElement(importStatement, other);
1466
1258
  }
1467
1259
  /**
1468
1260
  * Overrides the visitInstanceOf method to compare instanceof expressions.
@@ -1471,10 +1263,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1471
1263
  * @param other The other instanceof expression to compare with
1472
1264
  * @returns The visited instanceof expression, or undefined if the visit was aborted
1473
1265
  */
1474
- visitInstanceOf(instanceOf, other) {
1475
- return __awaiter(this, void 0, void 0, function* () {
1476
- return this.visitElement(instanceOf, other);
1477
- });
1266
+ async visitInstanceOf(instanceOf, other) {
1267
+ return this.visitElement(instanceOf, other);
1478
1268
  }
1479
1269
  /**
1480
1270
  * Overrides the visitIntersectionType method to compare intersection types.
@@ -1483,10 +1273,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1483
1273
  * @param other The other intersection type to compare with
1484
1274
  * @returns The visited intersection type, or undefined if the visit was aborted
1485
1275
  */
1486
- visitIntersectionType(intersectionType, other) {
1487
- return __awaiter(this, void 0, void 0, function* () {
1488
- return this.visitElement(intersectionType, other);
1489
- });
1276
+ async visitIntersectionType(intersectionType, other) {
1277
+ return this.visitElement(intersectionType, other);
1490
1278
  }
1491
1279
  /**
1492
1280
  * Overrides the visitLabel method to compare label statements.
@@ -1495,10 +1283,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1495
1283
  * @param other The other label statement to compare with
1496
1284
  * @returns The visited label statement, or undefined if the visit was aborted
1497
1285
  */
1498
- visitLabel(label, other) {
1499
- return __awaiter(this, void 0, void 0, function* () {
1500
- return this.visitElement(label, other);
1501
- });
1286
+ async visitLabel(label, other) {
1287
+ return this.visitElement(label, other);
1502
1288
  }
1503
1289
  /**
1504
1290
  * Overrides the visitLambda method to compare lambda expressions.
@@ -1507,10 +1293,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1507
1293
  * @param other The other lambda expression to compare with
1508
1294
  * @returns The visited lambda expression, or undefined if the visit was aborted
1509
1295
  */
1510
- visitLambda(lambda, other) {
1511
- return __awaiter(this, void 0, void 0, function* () {
1512
- return this.visitElement(lambda, other);
1513
- });
1296
+ async visitLambda(lambda, other) {
1297
+ return this.visitElement(lambda, other);
1514
1298
  }
1515
1299
  /**
1516
1300
  * Overrides the visitLambdaParameters method to compare lambda parameters.
@@ -1519,10 +1303,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1519
1303
  * @param other The other lambda parameters to compare with
1520
1304
  * @returns The visited lambda parameters, or undefined if the visit was aborted
1521
1305
  */
1522
- visitLambdaParameters(parameters, other) {
1523
- return __awaiter(this, void 0, void 0, function* () {
1524
- return this.visitElement(parameters, other);
1525
- });
1306
+ async visitLambdaParameters(parameters, other) {
1307
+ return this.visitElement(parameters, other);
1526
1308
  }
1527
1309
  /**
1528
1310
  * Overrides the visitMemberReference method to compare member references.
@@ -1531,10 +1313,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1531
1313
  * @param other The other member reference to compare with
1532
1314
  * @returns The visited member reference, or undefined if the visit was aborted
1533
1315
  */
1534
- visitMemberReference(memberReference, other) {
1535
- return __awaiter(this, void 0, void 0, function* () {
1536
- return this.visitElement(memberReference, other);
1537
- });
1316
+ async visitMemberReference(memberReference, other) {
1317
+ return this.visitElement(memberReference, other);
1538
1318
  }
1539
1319
  /**
1540
1320
  * Overrides the visitMethodDeclaration method to compare method declarations.
@@ -1543,10 +1323,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1543
1323
  * @param other The other method declaration to compare with
1544
1324
  * @returns The visited method declaration, or undefined if the visit was aborted
1545
1325
  */
1546
- visitMethodDeclaration(methodDeclaration, other) {
1547
- return __awaiter(this, void 0, void 0, function* () {
1548
- return this.visitElement(methodDeclaration, other);
1549
- });
1326
+ async visitMethodDeclaration(methodDeclaration, other) {
1327
+ return this.visitElement(methodDeclaration, other);
1550
1328
  }
1551
1329
  /**
1552
1330
  * Overrides the visitMethodInvocation method to compare method invocations.
@@ -1555,10 +1333,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1555
1333
  * @param other The other method invocation to compare with
1556
1334
  * @returns The visited method invocation, or undefined if the visit was aborted
1557
1335
  */
1558
- visitMethodInvocation(methodInvocation, other) {
1559
- return __awaiter(this, void 0, void 0, function* () {
1560
- return this.visitElement(methodInvocation, other);
1561
- });
1336
+ async visitMethodInvocation(methodInvocation, other) {
1337
+ return this.visitElement(methodInvocation, other);
1562
1338
  }
1563
1339
  /**
1564
1340
  * Overrides the visitModifier method to compare modifiers.
@@ -1567,10 +1343,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1567
1343
  * @param other The other modifier to compare with
1568
1344
  * @returns The visited modifier, or undefined if the visit was aborted
1569
1345
  */
1570
- visitModifier(modifier, other) {
1571
- return __awaiter(this, void 0, void 0, function* () {
1572
- return this.visitElement(modifier, other);
1573
- });
1346
+ async visitModifier(modifier, other) {
1347
+ return this.visitElement(modifier, other);
1574
1348
  }
1575
1349
  /**
1576
1350
  * Overrides the visitMultiCatch method to compare multi-catch expressions.
@@ -1579,10 +1353,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1579
1353
  * @param other The other multi-catch expression to compare with
1580
1354
  * @returns The visited multi-catch expression, or undefined if the visit was aborted
1581
1355
  */
1582
- visitMultiCatch(multiCatch, other) {
1583
- return __awaiter(this, void 0, void 0, function* () {
1584
- return this.visitElement(multiCatch, other);
1585
- });
1356
+ async visitMultiCatch(multiCatch, other) {
1357
+ return this.visitElement(multiCatch, other);
1586
1358
  }
1587
1359
  /**
1588
1360
  * Overrides the visitNewArray method to compare new array expressions.
@@ -1591,10 +1363,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1591
1363
  * @param other The other new array expression to compare with
1592
1364
  * @returns The visited new array expression, or undefined if the visit was aborted
1593
1365
  */
1594
- visitNewArray(newArray, other) {
1595
- return __awaiter(this, void 0, void 0, function* () {
1596
- return this.visitElement(newArray, other);
1597
- });
1366
+ async visitNewArray(newArray, other) {
1367
+ return this.visitElement(newArray, other);
1598
1368
  }
1599
1369
  /**
1600
1370
  * Overrides the visitNewClass method to compare new class expressions.
@@ -1603,10 +1373,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1603
1373
  * @param other The other new class expression to compare with
1604
1374
  * @returns The visited new class expression, or undefined if the visit was aborted
1605
1375
  */
1606
- visitNewClass(newClass, other) {
1607
- return __awaiter(this, void 0, void 0, function* () {
1608
- return this.visitElement(newClass, other);
1609
- });
1376
+ async visitNewClass(newClass, other) {
1377
+ return this.visitElement(newClass, other);
1610
1378
  }
1611
1379
  /**
1612
1380
  * Overrides the visitNullableType method to compare nullable types.
@@ -1615,10 +1383,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1615
1383
  * @param other The other nullable type to compare with
1616
1384
  * @returns The visited nullable type, or undefined if the visit was aborted
1617
1385
  */
1618
- visitNullableType(nullableType, other) {
1619
- return __awaiter(this, void 0, void 0, function* () {
1620
- return this.visitElement(nullableType, other);
1621
- });
1386
+ async visitNullableType(nullableType, other) {
1387
+ return this.visitElement(nullableType, other);
1622
1388
  }
1623
1389
  /**
1624
1390
  * Overrides the visitPackage method to compare package declarations.
@@ -1627,10 +1393,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1627
1393
  * @param other The other package declaration to compare with
1628
1394
  * @returns The visited package declaration, or undefined if the visit was aborted
1629
1395
  */
1630
- visitPackage(packageDeclaration, other) {
1631
- return __awaiter(this, void 0, void 0, function* () {
1632
- return this.visitElement(packageDeclaration, other);
1633
- });
1396
+ async visitPackage(packageDeclaration, other) {
1397
+ return this.visitElement(packageDeclaration, other);
1634
1398
  }
1635
1399
  /**
1636
1400
  * Overrides the visitParameterizedType method to compare parameterized types.
@@ -1639,10 +1403,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1639
1403
  * @param other The other parameterized type to compare with
1640
1404
  * @returns The visited parameterized type, or undefined if the visit was aborted
1641
1405
  */
1642
- visitParameterizedType(parameterizedType, other) {
1643
- return __awaiter(this, void 0, void 0, function* () {
1644
- return this.visitElement(parameterizedType, other);
1645
- });
1406
+ async visitParameterizedType(parameterizedType, other) {
1407
+ return this.visitElement(parameterizedType, other);
1646
1408
  }
1647
1409
  /**
1648
1410
  * Overrides the visitParentheses method to compare parentheses expressions.
@@ -1651,10 +1413,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1651
1413
  * @param other The other parentheses expression to compare with
1652
1414
  * @returns The visited parentheses expression, or undefined if the visit was aborted
1653
1415
  */
1654
- visitParentheses(parentheses, other) {
1655
- return __awaiter(this, void 0, void 0, function* () {
1656
- return this.visitElement(parentheses, other);
1657
- });
1416
+ async visitParentheses(parentheses, other) {
1417
+ return this.visitElement(parentheses, other);
1658
1418
  }
1659
1419
  /**
1660
1420
  * Overrides the visitParenthesizedTypeTree method to compare parenthesized type trees.
@@ -1663,10 +1423,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1663
1423
  * @param other The other parenthesized type tree to compare with
1664
1424
  * @returns The visited parenthesized type tree, or undefined if the visit was aborted
1665
1425
  */
1666
- visitParenthesizedTypeTree(parenthesizedTypeTree, other) {
1667
- return __awaiter(this, void 0, void 0, function* () {
1668
- return this.visitElement(parenthesizedTypeTree, other);
1669
- });
1426
+ async visitParenthesizedTypeTree(parenthesizedTypeTree, other) {
1427
+ return this.visitElement(parenthesizedTypeTree, other);
1670
1428
  }
1671
1429
  /**
1672
1430
  * Overrides the visitPrimitive method to compare primitive types.
@@ -1675,10 +1433,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1675
1433
  * @param other The other primitive type to compare with
1676
1434
  * @returns The visited primitive type, or undefined if the visit was aborted
1677
1435
  */
1678
- visitPrimitive(primitive, other) {
1679
- return __awaiter(this, void 0, void 0, function* () {
1680
- return this.visitElement(primitive, other);
1681
- });
1436
+ async visitPrimitive(primitive, other) {
1437
+ return this.visitElement(primitive, other);
1682
1438
  }
1683
1439
  /**
1684
1440
  * Overrides the visitReturn method to compare return statements.
@@ -1687,10 +1443,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1687
1443
  * @param other The other return statement to compare with
1688
1444
  * @returns The visited return statement, or undefined if the visit was aborted
1689
1445
  */
1690
- visitReturn(returnStatement, other) {
1691
- return __awaiter(this, void 0, void 0, function* () {
1692
- return this.visitElement(returnStatement, other);
1693
- });
1446
+ async visitReturn(returnStatement, other) {
1447
+ return this.visitElement(returnStatement, other);
1694
1448
  }
1695
1449
  /**
1696
1450
  * Overrides the visitSwitch method to compare switch statements.
@@ -1699,10 +1453,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1699
1453
  * @param other The other switch statement to compare with
1700
1454
  * @returns The visited switch statement, or undefined if the visit was aborted
1701
1455
  */
1702
- visitSwitch(switchStatement, other) {
1703
- return __awaiter(this, void 0, void 0, function* () {
1704
- return this.visitElement(switchStatement, other);
1705
- });
1456
+ async visitSwitch(switchStatement, other) {
1457
+ return this.visitElement(switchStatement, other);
1706
1458
  }
1707
1459
  /**
1708
1460
  * Overrides the visitSwitchExpression method to compare switch expressions.
@@ -1711,10 +1463,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1711
1463
  * @param other The other switch expression to compare with
1712
1464
  * @returns The visited switch expression, or undefined if the visit was aborted
1713
1465
  */
1714
- visitSwitchExpression(switchExpression, other) {
1715
- return __awaiter(this, void 0, void 0, function* () {
1716
- return this.visitElement(switchExpression, other);
1717
- });
1466
+ async visitSwitchExpression(switchExpression, other) {
1467
+ return this.visitElement(switchExpression, other);
1718
1468
  }
1719
1469
  /**
1720
1470
  * Overrides the visitSynchronized method to compare synchronized statements.
@@ -1723,10 +1473,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1723
1473
  * @param other The other synchronized statement to compare with
1724
1474
  * @returns The visited synchronized statement, or undefined if the visit was aborted
1725
1475
  */
1726
- visitSynchronized(synchronizedStatement, other) {
1727
- return __awaiter(this, void 0, void 0, function* () {
1728
- return this.visitElement(synchronizedStatement, other);
1729
- });
1476
+ async visitSynchronized(synchronizedStatement, other) {
1477
+ return this.visitElement(synchronizedStatement, other);
1730
1478
  }
1731
1479
  /**
1732
1480
  * Overrides the visitTernary method to compare ternary expressions.
@@ -1735,10 +1483,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1735
1483
  * @param other The other ternary expression to compare with
1736
1484
  * @returns The visited ternary expression, or undefined if the visit was aborted
1737
1485
  */
1738
- visitTernary(ternary, other) {
1739
- return __awaiter(this, void 0, void 0, function* () {
1740
- return this.visitElement(ternary, other);
1741
- });
1486
+ async visitTernary(ternary, other) {
1487
+ return this.visitElement(ternary, other);
1742
1488
  }
1743
1489
  /**
1744
1490
  * Overrides the visitThrow method to compare throw statements.
@@ -1747,10 +1493,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1747
1493
  * @param other The other throw statement to compare with
1748
1494
  * @returns The visited throw statement, or undefined if the visit was aborted
1749
1495
  */
1750
- visitThrow(throwStatement, other) {
1751
- return __awaiter(this, void 0, void 0, function* () {
1752
- return this.visitElement(throwStatement, other);
1753
- });
1496
+ async visitThrow(throwStatement, other) {
1497
+ return this.visitElement(throwStatement, other);
1754
1498
  }
1755
1499
  /**
1756
1500
  * Overrides the visitTry method to compare try statements.
@@ -1759,10 +1503,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1759
1503
  * @param other The other try statement to compare with
1760
1504
  * @returns The visited try statement, or undefined if the visit was aborted
1761
1505
  */
1762
- visitTry(tryStatement, other) {
1763
- return __awaiter(this, void 0, void 0, function* () {
1764
- return this.visitElement(tryStatement, other);
1765
- });
1506
+ async visitTry(tryStatement, other) {
1507
+ return this.visitElement(tryStatement, other);
1766
1508
  }
1767
1509
  /**
1768
1510
  * Overrides the visitTryResource method to compare try resources.
@@ -1771,10 +1513,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1771
1513
  * @param other The other try resource to compare with
1772
1514
  * @returns The visited try resource, or undefined if the visit was aborted
1773
1515
  */
1774
- visitTryResource(resource, other) {
1775
- return __awaiter(this, void 0, void 0, function* () {
1776
- return this.visitElement(resource, other);
1777
- });
1516
+ async visitTryResource(resource, other) {
1517
+ return this.visitElement(resource, other);
1778
1518
  }
1779
1519
  /**
1780
1520
  * Overrides the visitTryCatch method to compare try catch blocks.
@@ -1783,10 +1523,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1783
1523
  * @param other The other try catch block to compare with
1784
1524
  * @returns The visited try catch block, or undefined if the visit was aborted
1785
1525
  */
1786
- visitTryCatch(tryCatch, other) {
1787
- return __awaiter(this, void 0, void 0, function* () {
1788
- return this.visitElement(tryCatch, other);
1789
- });
1526
+ async visitTryCatch(tryCatch, other) {
1527
+ return this.visitElement(tryCatch, other);
1790
1528
  }
1791
1529
  /**
1792
1530
  * Overrides the visitTypeCast method to compare type cast expressions.
@@ -1795,10 +1533,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1795
1533
  * @param other The other type cast expression to compare with
1796
1534
  * @returns The visited type cast expression, or undefined if the visit was aborted
1797
1535
  */
1798
- visitTypeCast(typeCast, other) {
1799
- return __awaiter(this, void 0, void 0, function* () {
1800
- return this.visitElement(typeCast, other);
1801
- });
1536
+ async visitTypeCast(typeCast, other) {
1537
+ return this.visitElement(typeCast, other);
1802
1538
  }
1803
1539
  /**
1804
1540
  * Overrides the visitTypeParameter method to compare type parameters.
@@ -1807,10 +1543,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1807
1543
  * @param other The other type parameter to compare with
1808
1544
  * @returns The visited type parameter, or undefined if the visit was aborted
1809
1545
  */
1810
- visitTypeParameter(typeParameter, other) {
1811
- return __awaiter(this, void 0, void 0, function* () {
1812
- return this.visitElement(typeParameter, other);
1813
- });
1546
+ async visitTypeParameter(typeParameter, other) {
1547
+ return this.visitElement(typeParameter, other);
1814
1548
  }
1815
1549
  /**
1816
1550
  * Overrides the visitTypeParameters method to compare type parameters.
@@ -1819,10 +1553,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1819
1553
  * @param other The other type parameters to compare with
1820
1554
  * @returns The visited type parameters, or undefined if the visit was aborted
1821
1555
  */
1822
- visitTypeParameters(typeParameters, other) {
1823
- return __awaiter(this, void 0, void 0, function* () {
1824
- return this.visitElement(typeParameters, other);
1825
- });
1556
+ async visitTypeParameters(typeParameters, other) {
1557
+ return this.visitElement(typeParameters, other);
1826
1558
  }
1827
1559
  /**
1828
1560
  * Overrides the visitUnary method to compare unary expressions.
@@ -1831,10 +1563,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1831
1563
  * @param other The other unary expression to compare with
1832
1564
  * @returns The visited unary expression, or undefined if the visit was aborted
1833
1565
  */
1834
- visitUnary(unary, other) {
1835
- return __awaiter(this, void 0, void 0, function* () {
1836
- return this.visitElement(unary, other);
1837
- });
1566
+ async visitUnary(unary, other) {
1567
+ return this.visitElement(unary, other);
1838
1568
  }
1839
1569
  /**
1840
1570
  * Overrides the visitUnknown method to compare unknown nodes.
@@ -1843,10 +1573,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1843
1573
  * @param other The other unknown node to compare with
1844
1574
  * @returns The visited unknown node, or undefined if the visit was aborted
1845
1575
  */
1846
- visitUnknown(unknown, other) {
1847
- return __awaiter(this, void 0, void 0, function* () {
1848
- return this.visitElement(unknown, other);
1849
- });
1576
+ async visitUnknown(unknown, other) {
1577
+ return this.visitElement(unknown, other);
1850
1578
  }
1851
1579
  /**
1852
1580
  * Overrides the visitUnknownSource method to compare unknown sources.
@@ -1855,10 +1583,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1855
1583
  * @param other The other unknown source to compare with
1856
1584
  * @returns The visited unknown source, or undefined if the visit was aborted
1857
1585
  */
1858
- visitUnknownSource(unknownSource, other) {
1859
- return __awaiter(this, void 0, void 0, function* () {
1860
- return this.visitElement(unknownSource, other);
1861
- });
1586
+ async visitUnknownSource(unknownSource, other) {
1587
+ return this.visitElement(unknownSource, other);
1862
1588
  }
1863
1589
  /**
1864
1590
  * Overrides the visitVariableDeclarations method to compare variable declarations.
@@ -1867,10 +1593,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1867
1593
  * @param other The other variable declarations to compare with
1868
1594
  * @returns The visited variable declarations, or undefined if the visit was aborted
1869
1595
  */
1870
- visitVariableDeclarations(variableDeclarations, other) {
1871
- return __awaiter(this, void 0, void 0, function* () {
1872
- return this.visitElement(variableDeclarations, other);
1873
- });
1596
+ async visitVariableDeclarations(variableDeclarations, other) {
1597
+ return this.visitElement(variableDeclarations, other);
1874
1598
  }
1875
1599
  /**
1876
1600
  * Overrides the visitVariable method to compare variable declarations.
@@ -1879,10 +1603,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1879
1603
  * @param other The other variable declaration to compare with
1880
1604
  * @returns The visited variable declaration, or undefined if the visit was aborted
1881
1605
  */
1882
- visitVariable(variable, other) {
1883
- return __awaiter(this, void 0, void 0, function* () {
1884
- return this.visitElement(variable, other);
1885
- });
1606
+ async visitVariable(variable, other) {
1607
+ return this.visitElement(variable, other);
1886
1608
  }
1887
1609
  /**
1888
1610
  * Overrides the visitWhileLoop method to compare while loops.
@@ -1891,10 +1613,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1891
1613
  * @param other The other while loop to compare with
1892
1614
  * @returns The visited while loop, or undefined if the visit was aborted
1893
1615
  */
1894
- visitWhileLoop(whileLoop, other) {
1895
- return __awaiter(this, void 0, void 0, function* () {
1896
- return this.visitElement(whileLoop, other);
1897
- });
1616
+ async visitWhileLoop(whileLoop, other) {
1617
+ return this.visitElement(whileLoop, other);
1898
1618
  }
1899
1619
  /**
1900
1620
  * Overrides the visitWildcard method to compare wildcards.
@@ -1903,10 +1623,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1903
1623
  * @param other The other wildcard to compare with
1904
1624
  * @returns The visited wildcard, or undefined if the visit was aborted
1905
1625
  */
1906
- visitWildcard(wildcard, other) {
1907
- return __awaiter(this, void 0, void 0, function* () {
1908
- return this.visitElement(wildcard, other);
1909
- });
1626
+ async visitWildcard(wildcard, other) {
1627
+ return this.visitElement(wildcard, other);
1910
1628
  }
1911
1629
  /**
1912
1630
  * Overrides the visitYield method to compare yield statements.
@@ -1915,10 +1633,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1915
1633
  * @param other The other yield statement to compare with
1916
1634
  * @returns The visited yield statement, or undefined if the visit was aborted
1917
1635
  */
1918
- visitYield(yieldStatement, other) {
1919
- return __awaiter(this, void 0, void 0, function* () {
1920
- return this.visitElement(yieldStatement, other);
1921
- });
1636
+ async visitYield(yieldStatement, other) {
1637
+ return this.visitElement(yieldStatement, other);
1922
1638
  }
1923
1639
  /**
1924
1640
  * Overrides the visitVoid method to compare void expressions.
@@ -1927,10 +1643,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1927
1643
  * @param other The other void expression to compare with
1928
1644
  * @returns The visited void expression, or undefined if the visit was aborted
1929
1645
  */
1930
- visitVoid(void_, other) {
1931
- return __awaiter(this, void 0, void 0, function* () {
1932
- return this.visitElement(void_, other);
1933
- });
1646
+ async visitVoid(void_, other) {
1647
+ return this.visitElement(void_, other);
1934
1648
  }
1935
1649
  /**
1936
1650
  * Overrides the visitWithStatement method to compare with statements.
@@ -1939,10 +1653,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1939
1653
  * @param other The other with statement to compare with
1940
1654
  * @returns The visited with statement, or undefined if the visit was aborted
1941
1655
  */
1942
- visitWithStatement(withStatement, other) {
1943
- return __awaiter(this, void 0, void 0, function* () {
1944
- return this.visitElement(withStatement, other);
1945
- });
1656
+ async visitWithStatement(withStatement, other) {
1657
+ return this.visitElement(withStatement, other);
1946
1658
  }
1947
1659
  /**
1948
1660
  * Overrides the visitIndexSignatureDeclaration method to compare index signature declarations.
@@ -1951,10 +1663,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1951
1663
  * @param other The other index signature declaration to compare with
1952
1664
  * @returns The visited index signature declaration, or undefined if the visit was aborted
1953
1665
  */
1954
- visitIndexSignatureDeclaration(indexSignatureDeclaration, other) {
1955
- return __awaiter(this, void 0, void 0, function* () {
1956
- return this.visitElement(indexSignatureDeclaration, other);
1957
- });
1666
+ async visitIndexSignatureDeclaration(indexSignatureDeclaration, other) {
1667
+ return this.visitElement(indexSignatureDeclaration, other);
1958
1668
  }
1959
1669
  /**
1960
1670
  * Overrides the visitForOfLoop method to compare for-of loops.
@@ -1963,10 +1673,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1963
1673
  * @param other The other for-of loop to compare with
1964
1674
  * @returns The visited for-of loop, or undefined if the visit was aborted
1965
1675
  */
1966
- visitForOfLoop(forOfLoop, other) {
1967
- return __awaiter(this, void 0, void 0, function* () {
1968
- return this.visitElement(forOfLoop, other);
1969
- });
1676
+ async visitForOfLoop(forOfLoop, other) {
1677
+ return this.visitElement(forOfLoop, other);
1970
1678
  }
1971
1679
  /**
1972
1680
  * Overrides the visitForInLoop method to compare for-in loops.
@@ -1975,10 +1683,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1975
1683
  * @param other The other for-in loop to compare with
1976
1684
  * @returns The visited for-in loop, or undefined if the visit was aborted
1977
1685
  */
1978
- visitForInLoop(forInLoop, other) {
1979
- return __awaiter(this, void 0, void 0, function* () {
1980
- return this.visitElement(forInLoop, other);
1981
- });
1686
+ async visitForInLoop(forInLoop, other) {
1687
+ return this.visitElement(forInLoop, other);
1982
1688
  }
1983
1689
  /**
1984
1690
  * Overrides the visitNamespaceDeclaration method to compare namespace declarations.
@@ -1987,10 +1693,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1987
1693
  * @param other The other namespace declaration to compare with
1988
1694
  * @returns The visited namespace declaration, or undefined if the visit was aborted
1989
1695
  */
1990
- visitNamespaceDeclaration(namespaceDeclaration, other) {
1991
- return __awaiter(this, void 0, void 0, function* () {
1992
- return this.visitElement(namespaceDeclaration, other);
1993
- });
1696
+ async visitNamespaceDeclaration(namespaceDeclaration, other) {
1697
+ return this.visitElement(namespaceDeclaration, other);
1994
1698
  }
1995
1699
  /**
1996
1700
  * Overrides the visitTypeLiteral method to compare type literals.
@@ -1999,10 +1703,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
1999
1703
  * @param other The other type literal to compare with
2000
1704
  * @returns The visited type literal, or undefined if the visit was aborted
2001
1705
  */
2002
- visitTypeLiteral(typeLiteral, other) {
2003
- return __awaiter(this, void 0, void 0, function* () {
2004
- return this.visitElement(typeLiteral, other);
2005
- });
1706
+ async visitTypeLiteral(typeLiteral, other) {
1707
+ return this.visitElement(typeLiteral, other);
2006
1708
  }
2007
1709
  /**
2008
1710
  * Overrides the visitBindingElement method to compare binding elements.
@@ -2011,10 +1713,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
2011
1713
  * @param other The other binding element to compare with
2012
1714
  * @returns The visited binding element, or undefined if the visit was aborted
2013
1715
  */
2014
- visitBindingElement(bindingElement, other) {
2015
- return __awaiter(this, void 0, void 0, function* () {
2016
- return this.visitElement(bindingElement, other);
2017
- });
1716
+ async visitBindingElement(bindingElement, other) {
1717
+ return this.visitElement(bindingElement, other);
2018
1718
  }
2019
1719
  /**
2020
1720
  * Overrides the visitArrayBindingPattern method to compare array binding patterns.
@@ -2023,10 +1723,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
2023
1723
  * @param other The other array binding pattern to compare with
2024
1724
  * @returns The visited array binding pattern, or undefined if the visit was aborted
2025
1725
  */
2026
- visitArrayBindingPattern(arrayBindingPattern, other) {
2027
- return __awaiter(this, void 0, void 0, function* () {
2028
- return this.visitElement(arrayBindingPattern, other);
2029
- });
1726
+ async visitArrayBindingPattern(arrayBindingPattern, other) {
1727
+ return this.visitElement(arrayBindingPattern, other);
2030
1728
  }
2031
1729
  /**
2032
1730
  * Overrides the visitExportDeclaration method to compare export declarations.
@@ -2035,10 +1733,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
2035
1733
  * @param other The other export declaration to compare with
2036
1734
  * @returns The visited export declaration, or undefined if the visit was aborted
2037
1735
  */
2038
- visitExportDeclaration(exportDeclaration, other) {
2039
- return __awaiter(this, void 0, void 0, function* () {
2040
- return this.visitElement(exportDeclaration, other);
2041
- });
1736
+ async visitExportDeclaration(exportDeclaration, other) {
1737
+ return this.visitElement(exportDeclaration, other);
2042
1738
  }
2043
1739
  /**
2044
1740
  * Overrides the visitExportAssignment method to compare export assignments.
@@ -2047,10 +1743,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
2047
1743
  * @param other The other export assignment to compare with
2048
1744
  * @returns The visited export assignment, or undefined if the visit was aborted
2049
1745
  */
2050
- visitExportAssignment(exportAssignment, other) {
2051
- return __awaiter(this, void 0, void 0, function* () {
2052
- return this.visitElement(exportAssignment, other);
2053
- });
1746
+ async visitExportAssignment(exportAssignment, other) {
1747
+ return this.visitElement(exportAssignment, other);
2054
1748
  }
2055
1749
  /**
2056
1750
  * Overrides the visitNamedExports method to compare named exports.
@@ -2059,10 +1753,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
2059
1753
  * @param other The other named exports to compare with
2060
1754
  * @returns The visited named exports, or undefined if the visit was aborted
2061
1755
  */
2062
- visitNamedExports(namedExports, other) {
2063
- return __awaiter(this, void 0, void 0, function* () {
2064
- return this.visitElement(namedExports, other);
2065
- });
1756
+ async visitNamedExports(namedExports, other) {
1757
+ return this.visitElement(namedExports, other);
2066
1758
  }
2067
1759
  /**
2068
1760
  * Overrides the visitExportSpecifier method to compare export specifiers.
@@ -2071,10 +1763,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
2071
1763
  * @param other The other export specifier to compare with
2072
1764
  * @returns The visited export specifier, or undefined if the visit was aborted
2073
1765
  */
2074
- visitExportSpecifier(exportSpecifier, other) {
2075
- return __awaiter(this, void 0, void 0, function* () {
2076
- return this.visitElement(exportSpecifier, other);
2077
- });
1766
+ async visitExportSpecifier(exportSpecifier, other) {
1767
+ return this.visitElement(exportSpecifier, other);
2078
1768
  }
2079
1769
  /**
2080
1770
  * Overrides the visitComputedPropertyMethodDeclaration method to compare computed property method declarations.
@@ -2083,10 +1773,8 @@ class JavaScriptComparatorVisitor extends visitor_1.JavaScriptVisitor {
2083
1773
  * @param other The other computed property method declaration to compare with
2084
1774
  * @returns The visited computed property method declaration, or undefined if the visit was aborted
2085
1775
  */
2086
- visitComputedPropertyMethodDeclaration(computedPropMethod, other) {
2087
- return __awaiter(this, void 0, void 0, function* () {
2088
- return this.visitElement(computedPropMethod, other);
2089
- });
1776
+ async visitComputedPropertyMethodDeclaration(computedPropMethod, other) {
1777
+ return this.visitElement(computedPropMethod, other);
2090
1778
  }
2091
1779
  }
2092
1780
  exports.JavaScriptComparatorVisitor = JavaScriptComparatorVisitor;
@@ -2129,27 +1817,25 @@ class JavaScriptSemanticComparatorVisitor extends JavaScriptComparatorVisitor {
2129
1817
  }
2130
1818
  return tree;
2131
1819
  }
2132
- visit(j, p, parent) {
2133
- return __awaiter(this, void 0, void 0, function* () {
2134
- // If we've already found a mismatch, abort further processing
2135
- if (!this.match)
2136
- return j;
2137
- // Unwrap parentheses from both trees before comparing
2138
- const unwrappedJ = this.unwrap(j) || j;
2139
- const unwrappedP = this.unwrap(p) || p;
2140
- // Skip the kind check that the base class does - semantic matching allows different kinds
2141
- // (e.g., undefined identifier matching void expression)
2142
- // Update targetCursor to track the target node in parallel with the pattern cursor
2143
- const savedTargetCursor = this.targetCursor;
2144
- this.targetCursor = new tree_2.Cursor(unwrappedP, this.targetCursor);
2145
- try {
2146
- // Call the grandparent's visit to do actual visitation without the kind check
2147
- return yield visitor_1.JavaScriptVisitor.prototype.visit.call(this, unwrappedJ, unwrappedP);
2148
- }
2149
- finally {
2150
- this.targetCursor = savedTargetCursor;
2151
- }
2152
- });
1820
+ async visit(j, p, parent) {
1821
+ // If we've already found a mismatch, abort further processing
1822
+ if (!this.match)
1823
+ return j;
1824
+ // Unwrap parentheses from both trees before comparing
1825
+ const unwrappedJ = this.unwrap(j) || j;
1826
+ const unwrappedP = this.unwrap(p) || p;
1827
+ // Skip the kind check that the base class does - semantic matching allows different kinds
1828
+ // (e.g., undefined identifier matching void expression)
1829
+ // Update targetCursor to track the target node in parallel with the pattern cursor
1830
+ const savedTargetCursor = this.targetCursor;
1831
+ this.targetCursor = new tree_2.Cursor(unwrappedP, this.targetCursor);
1832
+ try {
1833
+ // Call the grandparent's visit to do actual visitation without the kind check
1834
+ return await visitor_1.JavaScriptVisitor.prototype.visit.call(this, unwrappedJ, unwrappedP);
1835
+ }
1836
+ finally {
1837
+ this.targetCursor = savedTargetCursor;
1838
+ }
2153
1839
  }
2154
1840
  /**
2155
1841
  * Override visitArrowFunction to allow semantic equivalence between expression body
@@ -2159,66 +1845,64 @@ class JavaScriptSemanticComparatorVisitor extends JavaScriptComparatorVisitor {
2159
1845
  * - `x => x + 1` matches `x => { return x + 1; }`
2160
1846
  * - `(x, y) => x + y` matches `(x, y) => { return x + y; }`
2161
1847
  */
2162
- visitArrowFunction(arrowFunction, other) {
2163
- return __awaiter(this, void 0, void 0, function* () {
2164
- if (!this.match)
2165
- return arrowFunction;
2166
- if (other.kind !== tree_1.JS.Kind.ArrowFunction) {
2167
- return this.kindMismatch();
2168
- }
2169
- const otherArrow = other;
2170
- // Compare all properties reflectively except lambda (handled specially below)
2171
- for (const key of Object.keys(arrowFunction)) {
2172
- if (key.startsWith('_') || key === 'id' || key === 'markers' || key === 'lambda') {
2173
- continue;
2174
- }
2175
- const jValue = arrowFunction[key];
2176
- const otherValue = otherArrow[key];
2177
- // Handle arrays
2178
- if (Array.isArray(jValue)) {
2179
- if (!Array.isArray(otherValue) || jValue.length !== otherValue.length) {
2180
- return this.arrayLengthMismatch(key);
2181
- }
2182
- for (let i = 0; i < jValue.length; i++) {
2183
- yield this.visitProperty(jValue[i], otherValue[i]);
2184
- if (!this.match)
2185
- return arrowFunction;
2186
- }
1848
+ async visitArrowFunction(arrowFunction, other) {
1849
+ if (!this.match)
1850
+ return arrowFunction;
1851
+ if (other.kind !== tree_1.JS.Kind.ArrowFunction) {
1852
+ return this.kindMismatch();
1853
+ }
1854
+ const otherArrow = other;
1855
+ // Compare all properties reflectively except lambda (handled specially below)
1856
+ for (const key of Object.keys(arrowFunction)) {
1857
+ if (key.startsWith('_') || key === 'id' || key === 'markers' || key === 'lambda') {
1858
+ continue;
1859
+ }
1860
+ const jValue = arrowFunction[key];
1861
+ const otherValue = otherArrow[key];
1862
+ // Handle arrays
1863
+ if (Array.isArray(jValue)) {
1864
+ if (!Array.isArray(otherValue) || jValue.length !== otherValue.length) {
1865
+ return this.arrayLengthMismatch(key);
2187
1866
  }
2188
- else {
2189
- yield this.visitProperty(jValue, otherValue);
1867
+ for (let i = 0; i < jValue.length; i++) {
1868
+ await this.visitProperty(jValue[i], otherValue[i]);
2190
1869
  if (!this.match)
2191
1870
  return arrowFunction;
2192
1871
  }
2193
1872
  }
2194
- // Compare lambda parameters
2195
- const params1 = arrowFunction.lambda.parameters.parameters;
2196
- const params2 = otherArrow.lambda.parameters.parameters;
2197
- if (params1.length !== params2.length) {
2198
- return this.arrayLengthMismatch('lambda.parameters.parameters');
2199
- }
2200
- for (let i = 0; i < params1.length; i++) {
2201
- yield this.visitProperty(params1[i], params2[i]);
1873
+ else {
1874
+ await this.visitProperty(jValue, otherValue);
2202
1875
  if (!this.match)
2203
1876
  return arrowFunction;
2204
1877
  }
2205
- // Handle semantic equivalence for lambda bodies
2206
- const body1 = arrowFunction.lambda.body;
2207
- const body2 = otherArrow.lambda.body;
2208
- // Try to extract the expression from each body
2209
- const expr1 = this.extractExpression(body1);
2210
- const expr2 = this.extractExpression(body2);
2211
- if (expr1 && expr2) {
2212
- // Both have extractable expressions - compare them
2213
- yield this.visit(expr1, expr2);
2214
- }
2215
- else {
2216
- // At least one is not a simple expression or block-with-return
2217
- // Fall back to exact comparison
2218
- yield this.visit(body1, body2);
2219
- }
2220
- return arrowFunction;
2221
- });
1878
+ }
1879
+ // Compare lambda parameters
1880
+ const params1 = arrowFunction.lambda.parameters.parameters;
1881
+ const params2 = otherArrow.lambda.parameters.parameters;
1882
+ if (params1.length !== params2.length) {
1883
+ return this.arrayLengthMismatch('lambda.parameters.parameters');
1884
+ }
1885
+ for (let i = 0; i < params1.length; i++) {
1886
+ await this.visitProperty(params1[i], params2[i]);
1887
+ if (!this.match)
1888
+ return arrowFunction;
1889
+ }
1890
+ // Handle semantic equivalence for lambda bodies
1891
+ const body1 = arrowFunction.lambda.body;
1892
+ const body2 = otherArrow.lambda.body;
1893
+ // Try to extract the expression from each body
1894
+ const expr1 = this.extractExpression(body1);
1895
+ const expr2 = this.extractExpression(body2);
1896
+ if (expr1 && expr2) {
1897
+ // Both have extractable expressions - compare them
1898
+ await this.visit(expr1, expr2);
1899
+ }
1900
+ else {
1901
+ // At least one is not a simple expression or block-with-return
1902
+ // Fall back to exact comparison
1903
+ await this.visit(body1, body2);
1904
+ }
1905
+ return arrowFunction;
2222
1906
  }
2223
1907
  /**
2224
1908
  * Override visitLambdaParameters to allow semantic equivalence between
@@ -2227,40 +1911,38 @@ class JavaScriptSemanticComparatorVisitor extends JavaScriptComparatorVisitor {
2227
1911
  * Examples:
2228
1912
  * - `x => x + 1` matches `(x) => x + 1`
2229
1913
  */
2230
- visitLambdaParameters(parameters, other) {
2231
- return __awaiter(this, void 0, void 0, function* () {
2232
- if (!this.match)
2233
- return parameters;
2234
- if (other.kind !== java_1.J.Kind.LambdaParameters) {
2235
- return this.kindMismatch();
2236
- }
2237
- const otherParams = other;
2238
- // Compare all properties except 'parenthesized' using reflection
2239
- for (const key of Object.keys(parameters)) {
2240
- if (key.startsWith('_') || key === 'id' || key === 'markers' || key === 'parenthesized') {
2241
- continue;
2242
- }
2243
- const jValue = parameters[key];
2244
- const otherValue = otherParams[key];
2245
- // Handle arrays
2246
- if (Array.isArray(jValue)) {
2247
- if (!Array.isArray(otherValue) || jValue.length !== otherValue.length) {
2248
- return this.arrayLengthMismatch(key);
2249
- }
2250
- for (let i = 0; i < jValue.length; i++) {
2251
- yield this.visitProperty(jValue[i], otherValue[i]);
2252
- if (!this.match)
2253
- return parameters;
2254
- }
1914
+ async visitLambdaParameters(parameters, other) {
1915
+ if (!this.match)
1916
+ return parameters;
1917
+ if (other.kind !== java_1.J.Kind.LambdaParameters) {
1918
+ return this.kindMismatch();
1919
+ }
1920
+ const otherParams = other;
1921
+ // Compare all properties except 'parenthesized' using reflection
1922
+ for (const key of Object.keys(parameters)) {
1923
+ if (key.startsWith('_') || key === 'id' || key === 'markers' || key === 'parenthesized') {
1924
+ continue;
1925
+ }
1926
+ const jValue = parameters[key];
1927
+ const otherValue = otherParams[key];
1928
+ // Handle arrays
1929
+ if (Array.isArray(jValue)) {
1930
+ if (!Array.isArray(otherValue) || jValue.length !== otherValue.length) {
1931
+ return this.arrayLengthMismatch(key);
2255
1932
  }
2256
- else {
2257
- yield this.visitProperty(jValue, otherValue);
1933
+ for (let i = 0; i < jValue.length; i++) {
1934
+ await this.visitProperty(jValue[i], otherValue[i]);
2258
1935
  if (!this.match)
2259
1936
  return parameters;
2260
1937
  }
2261
1938
  }
2262
- return parameters;
2263
- });
1939
+ else {
1940
+ await this.visitProperty(jValue, otherValue);
1941
+ if (!this.match)
1942
+ return parameters;
1943
+ }
1944
+ }
1945
+ return parameters;
2264
1946
  }
2265
1947
  /**
2266
1948
  * Override visitPropertyAssignment to allow semantic equivalence between
@@ -2270,44 +1952,39 @@ class JavaScriptSemanticComparatorVisitor extends JavaScriptComparatorVisitor {
2270
1952
  * - `{ x }` matches `{ x: x }`
2271
1953
  * - `{ x: x, y: y }` matches `{ x, y }`
2272
1954
  */
2273
- visitPropertyAssignment(propertyAssignment, other) {
2274
- const _super = Object.create(null, {
2275
- visitPropertyAssignment: { get: () => super.visitPropertyAssignment }
2276
- });
2277
- return __awaiter(this, void 0, void 0, function* () {
2278
- if (!this.match)
2279
- return propertyAssignment;
2280
- if (other.kind !== tree_1.JS.Kind.PropertyAssignment) {
2281
- return this.kindMismatch();
2282
- }
2283
- const otherProp = other;
2284
- // Extract property names for semantic comparison
2285
- const propName = this.getPropertyName(propertyAssignment);
2286
- const otherPropName = this.getPropertyName(otherProp);
2287
- // Names must match
2288
- if (!propName || !otherPropName || propName !== otherPropName) {
2289
- // Can't do semantic comparison without identifiers, fall back to exact comparison
2290
- return yield _super.visitPropertyAssignment.call(this, propertyAssignment, other);
2291
- }
2292
- // Detect shorthand (no initializer) vs longhand (has initializer)
2293
- const isShorthand1 = !propertyAssignment.initializer;
2294
- const isShorthand2 = !otherProp.initializer;
2295
- if (isShorthand1 === isShorthand2) {
2296
- // Both shorthand or both longhand - use base comparison
2297
- return yield _super.visitPropertyAssignment.call(this, propertyAssignment, other);
2298
- }
2299
- // One is shorthand, one is longhand - check semantic equivalence
2300
- const longhandProp = isShorthand1 ? otherProp : propertyAssignment;
2301
- // Check if the longhand's initializer is an identifier with the same name as the property
2302
- if (this.isIdentifierWithName(longhandProp.initializer, propName)) {
2303
- // Semantically equivalent!
2304
- return propertyAssignment;
2305
- }
2306
- else {
2307
- // Not equivalent (e.g., { x: y })
2308
- return this.structuralMismatch('initializer');
2309
- }
2310
- });
1955
+ async visitPropertyAssignment(propertyAssignment, other) {
1956
+ if (!this.match)
1957
+ return propertyAssignment;
1958
+ if (other.kind !== tree_1.JS.Kind.PropertyAssignment) {
1959
+ return this.kindMismatch();
1960
+ }
1961
+ const otherProp = other;
1962
+ // Extract property names for semantic comparison
1963
+ const propName = this.getPropertyName(propertyAssignment);
1964
+ const otherPropName = this.getPropertyName(otherProp);
1965
+ // Names must match
1966
+ if (!propName || !otherPropName || propName !== otherPropName) {
1967
+ // Can't do semantic comparison without identifiers, fall back to exact comparison
1968
+ return await super.visitPropertyAssignment(propertyAssignment, other);
1969
+ }
1970
+ // Detect shorthand (no initializer) vs longhand (has initializer)
1971
+ const isShorthand1 = !propertyAssignment.initializer;
1972
+ const isShorthand2 = !otherProp.initializer;
1973
+ if (isShorthand1 === isShorthand2) {
1974
+ // Both shorthand or both longhand - use base comparison
1975
+ return await super.visitPropertyAssignment(propertyAssignment, other);
1976
+ }
1977
+ // One is shorthand, one is longhand - check semantic equivalence
1978
+ const longhandProp = isShorthand1 ? otherProp : propertyAssignment;
1979
+ // Check if the longhand's initializer is an identifier with the same name as the property
1980
+ if (this.isIdentifierWithName(longhandProp.initializer, propName)) {
1981
+ // Semantically equivalent!
1982
+ return propertyAssignment;
1983
+ }
1984
+ else {
1985
+ // Not equivalent (e.g., { x: y })
1986
+ return this.structuralMismatch('initializer');
1987
+ }
2311
1988
  }
2312
1989
  /**
2313
1990
  * Extracts the property name from a PropertyAssignment.
@@ -2354,24 +2031,19 @@ class JavaScriptSemanticComparatorVisitor extends JavaScriptComparatorVisitor {
2354
2031
  * When lenientTypeMatching is enabled, null vs Type comparisons are allowed
2355
2032
  * (where one value is null/undefined and the other is a Type object).
2356
2033
  */
2357
- visitProperty(j, other, propertyName) {
2358
- const _super = Object.create(null, {
2359
- visitProperty: { get: () => super.visitProperty }
2360
- });
2361
- return __awaiter(this, void 0, void 0, function* () {
2362
- // Handle null/undefined with lenient type matching
2363
- if (this.lenientTypeMatching && (j == null || other == null)) {
2364
- if (j !== other) {
2365
- // Don't abort if one is null and the other is a Type
2366
- if (!java_1.Type.isType(j) && !java_1.Type.isType(other)) {
2367
- this.structuralMismatch(propertyName);
2368
- }
2034
+ async visitProperty(j, other, propertyName) {
2035
+ // Handle null/undefined with lenient type matching
2036
+ if (this.lenientTypeMatching && (j == null || other == null)) {
2037
+ if (j !== other) {
2038
+ // Don't abort if one is null and the other is a Type
2039
+ if (!java_1.Type.isType(j) && !java_1.Type.isType(other)) {
2040
+ this.structuralMismatch(propertyName);
2369
2041
  }
2370
- return j;
2371
2042
  }
2372
- // Otherwise, use base class behavior
2373
- return _super.visitProperty.call(this, j, other);
2374
- });
2043
+ return j;
2044
+ }
2045
+ // Otherwise, use base class behavior
2046
+ return super.visitProperty(j, other);
2375
2047
  }
2376
2048
  /**
2377
2049
  * Checks if two types are semantically equal.
@@ -2444,253 +2116,239 @@ class JavaScriptSemanticComparatorVisitor extends JavaScriptComparatorVisitor {
2444
2116
  * When types match semantically, we allow matching even if one has a receiver
2445
2117
  * and the other doesn't (e.g., `isDate(x)` vs `util.isDate(x)`).
2446
2118
  */
2447
- visitMethodInvocation(method, other) {
2448
- const _super = Object.create(null, {
2449
- visitMethodInvocation: { get: () => super.visitMethodInvocation }
2450
- });
2451
- return __awaiter(this, void 0, void 0, function* () {
2452
- if (other.kind !== java_1.J.Kind.MethodInvocation) {
2453
- return this.kindMismatch();
2119
+ async visitMethodInvocation(method, other) {
2120
+ if (other.kind !== java_1.J.Kind.MethodInvocation) {
2121
+ return this.kindMismatch();
2122
+ }
2123
+ const otherMethod = other;
2124
+ // Check if we can skip name checking based on type attribution
2125
+ // We can only skip the name check if both have method types AND they represent the SAME method
2126
+ // (not just type-compatible methods, but the actual same function with same FQN)
2127
+ let canSkipNameCheck = false;
2128
+ if (method.methodType && otherMethod.methodType) {
2129
+ // Check if both method types have fully qualified declaring types with the same FQN
2130
+ // This indicates they're the same method from the same module (possibly aliased)
2131
+ const methodDeclaringType = method.methodType.declaringType;
2132
+ const otherDeclaringType = otherMethod.methodType.declaringType;
2133
+ if (methodDeclaringType && otherDeclaringType &&
2134
+ java_1.Type.isFullyQualified(methodDeclaringType) && java_1.Type.isFullyQualified(otherDeclaringType)) {
2135
+ const methodFQN = java_1.Type.FullyQualified.getFullyQualifiedName(methodDeclaringType);
2136
+ const otherFQN = java_1.Type.FullyQualified.getFullyQualifiedName(otherDeclaringType);
2137
+ // Same module/class AND same method name in the type = same method (can be aliased)
2138
+ if (methodFQN === otherFQN && method.methodType.name === otherMethod.methodType.name) {
2139
+ canSkipNameCheck = true;
2140
+ }
2141
+ // If FQNs or method names don't match, we can't skip name check - fall through to name checking
2142
+ }
2143
+ // If one or both don't have fully qualified types, we can't safely skip name checking
2144
+ // Fall through to normal name comparison below
2145
+ }
2146
+ // Check names unless we determined we can skip based on type FQN matching
2147
+ if (!canSkipNameCheck) {
2148
+ if (method.name.simpleName !== otherMethod.name.simpleName) {
2149
+ return this.valueMismatch('name.simpleName', method.name.simpleName, otherMethod.name.simpleName);
2150
+ }
2151
+ // In strict mode, check type attribution requirements
2152
+ if (!this.lenientTypeMatching) {
2153
+ // Strict mode: if one has type but the other doesn't, they don't match
2154
+ if ((method.methodType && !otherMethod.methodType) ||
2155
+ (!method.methodType && otherMethod.methodType)) {
2156
+ return this.typeMismatch('methodType');
2157
+ }
2158
+ }
2159
+ // If neither has type, use structural comparison
2160
+ if (!method.methodType && !otherMethod.methodType) {
2161
+ return super.visitMethodInvocation(method, other);
2454
2162
  }
2455
- const otherMethod = other;
2456
- // Check if we can skip name checking based on type attribution
2457
- // We can only skip the name check if both have method types AND they represent the SAME method
2458
- // (not just type-compatible methods, but the actual same function with same FQN)
2459
- let canSkipNameCheck = false;
2163
+ // If both have types with FQ declaring types, verify they're compatible
2164
+ // (This prevents matching completely different methods like util.isArray vs util.isBoolean)
2460
2165
  if (method.methodType && otherMethod.methodType) {
2461
- // Check if both method types have fully qualified declaring types with the same FQN
2462
- // This indicates they're the same method from the same module (possibly aliased)
2463
2166
  const methodDeclaringType = method.methodType.declaringType;
2464
2167
  const otherDeclaringType = otherMethod.methodType.declaringType;
2465
2168
  if (methodDeclaringType && otherDeclaringType &&
2466
2169
  java_1.Type.isFullyQualified(methodDeclaringType) && java_1.Type.isFullyQualified(otherDeclaringType)) {
2467
2170
  const methodFQN = java_1.Type.FullyQualified.getFullyQualifiedName(methodDeclaringType);
2468
2171
  const otherFQN = java_1.Type.FullyQualified.getFullyQualifiedName(otherDeclaringType);
2469
- // Same module/class AND same method name in the type = same method (can be aliased)
2470
- if (methodFQN === otherFQN && method.methodType.name === otherMethod.methodType.name) {
2471
- canSkipNameCheck = true;
2172
+ // Different declaring types = different methods, even with same name
2173
+ if (methodFQN !== otherFQN) {
2174
+ return this.valueMismatch('methodType.declaringType');
2472
2175
  }
2473
- // If FQNs or method names don't match, we can't skip name check - fall through to name checking
2474
2176
  }
2475
- // If one or both don't have fully qualified types, we can't safely skip name checking
2476
- // Fall through to normal name comparison below
2477
2177
  }
2478
- // Check names unless we determined we can skip based on type FQN matching
2479
- if (!canSkipNameCheck) {
2480
- if (method.name.simpleName !== otherMethod.name.simpleName) {
2481
- return this.valueMismatch('name.simpleName', method.name.simpleName, otherMethod.name.simpleName);
2482
- }
2483
- // In strict mode, check type attribution requirements
2484
- if (!this.lenientTypeMatching) {
2485
- // Strict mode: if one has type but the other doesn't, they don't match
2486
- if ((method.methodType && !otherMethod.methodType) ||
2487
- (!method.methodType && otherMethod.methodType)) {
2488
- return this.typeMismatch('methodType');
2489
- }
2490
- }
2491
- // If neither has type, use structural comparison
2492
- if (!method.methodType && !otherMethod.methodType) {
2493
- return _super.visitMethodInvocation.call(this, method, other);
2494
- }
2495
- // If both have types with FQ declaring types, verify they're compatible
2496
- // (This prevents matching completely different methods like util.isArray vs util.isBoolean)
2497
- if (method.methodType && otherMethod.methodType) {
2498
- const methodDeclaringType = method.methodType.declaringType;
2499
- const otherDeclaringType = otherMethod.methodType.declaringType;
2500
- if (methodDeclaringType && otherDeclaringType &&
2501
- java_1.Type.isFullyQualified(methodDeclaringType) && java_1.Type.isFullyQualified(otherDeclaringType)) {
2502
- const methodFQN = java_1.Type.FullyQualified.getFullyQualifiedName(methodDeclaringType);
2503
- const otherFQN = java_1.Type.FullyQualified.getFullyQualifiedName(otherDeclaringType);
2504
- // Different declaring types = different methods, even with same name
2505
- if (methodFQN !== otherFQN) {
2506
- return this.valueMismatch('methodType.declaringType');
2507
- }
2508
- }
2509
- }
2510
- }
2511
- // When types match (canSkipNameCheck = true), we can skip select comparison entirely.
2512
- // This allows matching forwardRef() vs React.forwardRef() where types indicate same method.
2513
- if (!canSkipNameCheck) {
2514
- // Types didn't provide a match - must compare receivers structurally
2515
- if ((method.select === undefined) !== (otherMethod.select === undefined)) {
2516
- return this.structuralMismatch('select');
2517
- }
2518
- if (method.select && otherMethod.select) {
2519
- yield this.visitRightPaddedProperty('select', method.select, otherMethod.select);
2520
- if (!this.match)
2521
- return method;
2522
- }
2523
- }
2524
- // else: types matched, skip select comparison (allows namespace vs named imports)
2525
- // Compare type parameters
2526
- if ((method.typeParameters === undefined) !== (otherMethod.typeParameters === undefined)) {
2527
- return this.structuralMismatch('typeParameters');
2528
- }
2529
- if (method.typeParameters && otherMethod.typeParameters) {
2530
- yield this.visitContainerProperty('typeParameters', method.typeParameters, otherMethod.typeParameters);
2531
- if (!this.match)
2532
- return method;
2533
- }
2534
- // Compare name
2535
- // If we determined we can skip name check (same FQN method, possibly aliased), skip it
2536
- // This allows matching aliased imports where names differ but types are the same
2537
- if (!canSkipNameCheck) {
2538
- yield this.visit(method.name, otherMethod.name);
2178
+ }
2179
+ // When types match (canSkipNameCheck = true), we can skip select comparison entirely.
2180
+ // This allows matching forwardRef() vs React.forwardRef() where types indicate same method.
2181
+ if (!canSkipNameCheck) {
2182
+ // Types didn't provide a match - must compare receivers structurally
2183
+ if ((method.select === undefined) !== (otherMethod.select === undefined)) {
2184
+ return this.structuralMismatch('select');
2185
+ }
2186
+ if (method.select && otherMethod.select) {
2187
+ await this.visitRightPaddedProperty('select', method.select, otherMethod.select);
2539
2188
  if (!this.match)
2540
2189
  return method;
2541
2190
  }
2542
- // Compare arguments
2543
- yield this.visitContainerProperty('arguments', method.arguments, otherMethod.arguments);
2191
+ }
2192
+ // else: types matched, skip select comparison (allows namespace vs named imports)
2193
+ // Compare type parameters
2194
+ if ((method.typeParameters === undefined) !== (otherMethod.typeParameters === undefined)) {
2195
+ return this.structuralMismatch('typeParameters');
2196
+ }
2197
+ if (method.typeParameters && otherMethod.typeParameters) {
2198
+ await this.visitContainerProperty('typeParameters', method.typeParameters, otherMethod.typeParameters);
2544
2199
  if (!this.match)
2545
2200
  return method;
2201
+ }
2202
+ // Compare name
2203
+ // If we determined we can skip name check (same FQN method, possibly aliased), skip it
2204
+ // This allows matching aliased imports where names differ but types are the same
2205
+ if (!canSkipNameCheck) {
2206
+ await this.visit(method.name, otherMethod.name);
2207
+ if (!this.match)
2208
+ return method;
2209
+ }
2210
+ // Compare arguments
2211
+ await this.visitContainerProperty('arguments', method.arguments, otherMethod.arguments);
2212
+ if (!this.match)
2546
2213
  return method;
2547
- });
2214
+ return method;
2548
2215
  }
2549
2216
  /**
2550
2217
  * Override identifier comparison to include:
2551
2218
  * 1. Type checking for field access
2552
2219
  * 2. Semantic equivalence between `undefined` identifier and void expressions
2553
2220
  */
2554
- visitIdentifier(identifier, other) {
2555
- const _super = Object.create(null, {
2556
- visitIdentifier: { get: () => super.visitIdentifier }
2557
- });
2558
- return __awaiter(this, void 0, void 0, function* () {
2559
- // Check if this identifier is "undefined" and the other is a void expression
2560
- if (identifier.simpleName === 'undefined' && other.kind === tree_1.JS.Kind.Void) {
2561
- // Both evaluate to undefined, so they match
2562
- return identifier;
2563
- }
2564
- if (other.kind !== java_1.J.Kind.Identifier) {
2565
- return this.kindMismatch();
2566
- }
2567
- const otherIdentifier = other;
2568
- // Check name matches
2569
- if (identifier.simpleName !== otherIdentifier.simpleName) {
2570
- return this.valueMismatch('simpleName');
2571
- }
2572
- // For identifiers with field types, check type attribution
2573
- if (identifier.fieldType && otherIdentifier.fieldType) {
2574
- if (!this.isOfType(identifier.fieldType, otherIdentifier.fieldType)) {
2575
- return this.typeMismatch('fieldType');
2576
- }
2221
+ async visitIdentifier(identifier, other) {
2222
+ // Check if this identifier is "undefined" and the other is a void expression
2223
+ if (identifier.simpleName === 'undefined' && other.kind === tree_1.JS.Kind.Void) {
2224
+ // Both evaluate to undefined, so they match
2225
+ return identifier;
2226
+ }
2227
+ if (other.kind !== java_1.J.Kind.Identifier) {
2228
+ return this.kindMismatch();
2229
+ }
2230
+ const otherIdentifier = other;
2231
+ // Check name matches
2232
+ if (identifier.simpleName !== otherIdentifier.simpleName) {
2233
+ return this.valueMismatch('simpleName');
2234
+ }
2235
+ // For identifiers with field types, check type attribution
2236
+ if (identifier.fieldType && otherIdentifier.fieldType) {
2237
+ if (!this.isOfType(identifier.fieldType, otherIdentifier.fieldType)) {
2238
+ return this.typeMismatch('fieldType');
2577
2239
  }
2578
- else if (identifier.fieldType || otherIdentifier.fieldType) {
2579
- // Lenient mode: if either has no type, allow structural matching
2580
- if (!this.lenientTypeMatching) {
2581
- // Strict mode: if only one has a type, they don't match
2582
- return this.typeMismatch('fieldType');
2583
- }
2240
+ }
2241
+ else if (identifier.fieldType || otherIdentifier.fieldType) {
2242
+ // Lenient mode: if either has no type, allow structural matching
2243
+ if (!this.lenientTypeMatching) {
2244
+ // Strict mode: if only one has a type, they don't match
2245
+ return this.typeMismatch('fieldType');
2584
2246
  }
2585
- return _super.visitIdentifier.call(this, identifier, other);
2586
- });
2247
+ }
2248
+ return super.visitIdentifier(identifier, other);
2587
2249
  }
2588
2250
  /**
2589
2251
  * Override variable declarations comparison to handle lenient type matching.
2590
2252
  * When lenientTypeMatching is true, patterns without typeExpression can match
2591
2253
  * code with typeExpression.
2592
2254
  */
2593
- visitVariableDeclarations(variableDeclarations, other) {
2594
- return __awaiter(this, void 0, void 0, function* () {
2595
- const otherVariableDeclarations = other;
2596
- // Visit leading annotations
2597
- yield this.visitArrayProperty(variableDeclarations, 'leadingAnnotations', variableDeclarations.leadingAnnotations, otherVariableDeclarations.leadingAnnotations, (ann1, ann2) => __awaiter(this, void 0, void 0, function* () { yield this.visit(ann1, ann2); }));
2598
- if (!this.match)
2599
- return variableDeclarations;
2600
- // Visit modifiers
2601
- yield this.visitArrayProperty(variableDeclarations, 'modifiers', variableDeclarations.modifiers, otherVariableDeclarations.modifiers, (mod1, mod2) => __awaiter(this, void 0, void 0, function* () { yield this.visit(mod1, mod2); }));
2602
- if (!this.match)
2603
- return variableDeclarations;
2604
- // Compare typeExpression - lenient matching allows one to be undefined
2605
- if ((variableDeclarations.typeExpression === undefined) !== (otherVariableDeclarations.typeExpression === undefined)) {
2606
- if (!this.lenientTypeMatching) {
2607
- return this.structuralMismatch('typeExpression');
2608
- }
2609
- // In lenient mode, skip type comparison and continue
2610
- }
2611
- else if (variableDeclarations.typeExpression && otherVariableDeclarations.typeExpression) {
2612
- // Both have typeExpression, visit them
2613
- yield this.visit(variableDeclarations.typeExpression, otherVariableDeclarations.typeExpression);
2614
- if (!this.match)
2615
- return variableDeclarations;
2616
- }
2617
- // Compare varargs
2618
- if ((variableDeclarations.varargs === undefined) !== (otherVariableDeclarations.varargs === undefined)) {
2619
- return this.structuralMismatch('varargs');
2255
+ async visitVariableDeclarations(variableDeclarations, other) {
2256
+ const otherVariableDeclarations = other;
2257
+ // Visit leading annotations
2258
+ await this.visitArrayProperty(variableDeclarations, 'leadingAnnotations', variableDeclarations.leadingAnnotations, otherVariableDeclarations.leadingAnnotations, async (ann1, ann2) => { await this.visit(ann1, ann2); });
2259
+ if (!this.match)
2260
+ return variableDeclarations;
2261
+ // Visit modifiers
2262
+ await this.visitArrayProperty(variableDeclarations, 'modifiers', variableDeclarations.modifiers, otherVariableDeclarations.modifiers, async (mod1, mod2) => { await this.visit(mod1, mod2); });
2263
+ if (!this.match)
2264
+ return variableDeclarations;
2265
+ // Compare typeExpression - lenient matching allows one to be undefined
2266
+ if ((variableDeclarations.typeExpression === undefined) !== (otherVariableDeclarations.typeExpression === undefined)) {
2267
+ if (!this.lenientTypeMatching) {
2268
+ return this.structuralMismatch('typeExpression');
2620
2269
  }
2621
- // Compare variables
2622
- yield this.visitArrayProperty(variableDeclarations, 'variables', variableDeclarations.variables, otherVariableDeclarations.variables, (var1, var2) => __awaiter(this, void 0, void 0, function* () { yield this.visitRightPadded(var1, var2); }));
2270
+ // In lenient mode, skip type comparison and continue
2271
+ }
2272
+ else if (variableDeclarations.typeExpression && otherVariableDeclarations.typeExpression) {
2273
+ // Both have typeExpression, visit them
2274
+ await this.visit(variableDeclarations.typeExpression, otherVariableDeclarations.typeExpression);
2623
2275
  if (!this.match)
2624
2276
  return variableDeclarations;
2277
+ }
2278
+ // Compare varargs
2279
+ if ((variableDeclarations.varargs === undefined) !== (otherVariableDeclarations.varargs === undefined)) {
2280
+ return this.structuralMismatch('varargs');
2281
+ }
2282
+ // Compare variables
2283
+ await this.visitArrayProperty(variableDeclarations, 'variables', variableDeclarations.variables, otherVariableDeclarations.variables, async (var1, var2) => { await this.visitRightPadded(var1, var2); });
2284
+ if (!this.match)
2625
2285
  return variableDeclarations;
2626
- });
2286
+ return variableDeclarations;
2627
2287
  }
2628
2288
  /**
2629
2289
  * Override method declaration comparison to handle lenient type matching.
2630
2290
  * When lenientTypeMatching is true, patterns without returnTypeExpression can match
2631
2291
  * code with returnTypeExpression.
2632
2292
  */
2633
- visitMethodDeclaration(methodDeclaration, other) {
2634
- return __awaiter(this, void 0, void 0, function* () {
2635
- const otherMethodDeclaration = other;
2636
- // Visit leading annotations
2637
- yield this.visitArrayProperty(methodDeclaration, 'leadingAnnotations', methodDeclaration.leadingAnnotations, otherMethodDeclaration.leadingAnnotations, (ann1, ann2) => __awaiter(this, void 0, void 0, function* () { yield this.visit(ann1, ann2); }));
2293
+ async visitMethodDeclaration(methodDeclaration, other) {
2294
+ const otherMethodDeclaration = other;
2295
+ // Visit leading annotations
2296
+ await this.visitArrayProperty(methodDeclaration, 'leadingAnnotations', methodDeclaration.leadingAnnotations, otherMethodDeclaration.leadingAnnotations, async (ann1, ann2) => { await this.visit(ann1, ann2); });
2297
+ if (!this.match)
2298
+ return methodDeclaration;
2299
+ // Visit modifiers
2300
+ await this.visitArrayProperty(methodDeclaration, 'modifiers', methodDeclaration.modifiers, otherMethodDeclaration.modifiers, async (mod1, mod2) => { await this.visit(mod1, mod2); });
2301
+ if (!this.match)
2302
+ return methodDeclaration;
2303
+ // Visit type parameters if present
2304
+ if (!!methodDeclaration.typeParameters !== !!otherMethodDeclaration.typeParameters) {
2305
+ return this.structuralMismatch('typeParameters');
2306
+ }
2307
+ if (methodDeclaration.typeParameters && otherMethodDeclaration.typeParameters) {
2308
+ await this.visit(methodDeclaration.typeParameters, otherMethodDeclaration.typeParameters);
2638
2309
  if (!this.match)
2639
2310
  return methodDeclaration;
2640
- // Visit modifiers
2641
- yield this.visitArrayProperty(methodDeclaration, 'modifiers', methodDeclaration.modifiers, otherMethodDeclaration.modifiers, (mod1, mod2) => __awaiter(this, void 0, void 0, function* () { yield this.visit(mod1, mod2); }));
2311
+ }
2312
+ // Compare returnTypeExpression - lenient matching allows one to be undefined
2313
+ if ((methodDeclaration.returnTypeExpression === undefined) !== (otherMethodDeclaration.returnTypeExpression === undefined)) {
2314
+ if (!this.lenientTypeMatching) {
2315
+ return this.typeMismatch('returnTypeExpression');
2316
+ }
2317
+ // In lenient mode, skip type comparison and continue
2318
+ }
2319
+ else if (methodDeclaration.returnTypeExpression && otherMethodDeclaration.returnTypeExpression) {
2320
+ // Both have returnTypeExpression, visit them
2321
+ await this.visit(methodDeclaration.returnTypeExpression, otherMethodDeclaration.returnTypeExpression);
2642
2322
  if (!this.match)
2643
2323
  return methodDeclaration;
2644
- // Visit type parameters if present
2645
- if (!!methodDeclaration.typeParameters !== !!otherMethodDeclaration.typeParameters) {
2646
- return this.structuralMismatch('typeParameters');
2647
- }
2648
- if (methodDeclaration.typeParameters && otherMethodDeclaration.typeParameters) {
2649
- yield this.visit(methodDeclaration.typeParameters, otherMethodDeclaration.typeParameters);
2650
- if (!this.match)
2651
- return methodDeclaration;
2652
- }
2653
- // Compare returnTypeExpression - lenient matching allows one to be undefined
2654
- if ((methodDeclaration.returnTypeExpression === undefined) !== (otherMethodDeclaration.returnTypeExpression === undefined)) {
2655
- if (!this.lenientTypeMatching) {
2656
- return this.typeMismatch('returnTypeExpression');
2657
- }
2658
- // In lenient mode, skip type comparison and continue
2659
- }
2660
- else if (methodDeclaration.returnTypeExpression && otherMethodDeclaration.returnTypeExpression) {
2661
- // Both have returnTypeExpression, visit them
2662
- yield this.visit(methodDeclaration.returnTypeExpression, otherMethodDeclaration.returnTypeExpression);
2663
- if (!this.match)
2664
- return methodDeclaration;
2665
- }
2666
- // Visit name
2667
- yield this.visit(methodDeclaration.name, otherMethodDeclaration.name);
2324
+ }
2325
+ // Visit name
2326
+ await this.visit(methodDeclaration.name, otherMethodDeclaration.name);
2327
+ if (!this.match)
2328
+ return methodDeclaration;
2329
+ // Compare parameters
2330
+ await this.visitContainer(methodDeclaration.parameters, otherMethodDeclaration.parameters);
2331
+ if (!this.match)
2332
+ return methodDeclaration;
2333
+ // Visit throws if present
2334
+ if (!!methodDeclaration.throws !== !!otherMethodDeclaration.throws) {
2335
+ return this.structuralMismatch('throws');
2336
+ }
2337
+ if (methodDeclaration.throws && otherMethodDeclaration.throws) {
2338
+ await this.visitContainer(methodDeclaration.throws, otherMethodDeclaration.throws);
2668
2339
  if (!this.match)
2669
2340
  return methodDeclaration;
2670
- // Compare parameters
2671
- yield this.visitContainer(methodDeclaration.parameters, otherMethodDeclaration.parameters);
2341
+ }
2342
+ // Visit body if present
2343
+ if (!!methodDeclaration.body !== !!otherMethodDeclaration.body) {
2344
+ return this.structuralMismatch('body');
2345
+ }
2346
+ if (methodDeclaration.body && otherMethodDeclaration.body) {
2347
+ await this.visit(methodDeclaration.body, otherMethodDeclaration.body);
2672
2348
  if (!this.match)
2673
2349
  return methodDeclaration;
2674
- // Visit throws if present
2675
- if (!!methodDeclaration.throws !== !!otherMethodDeclaration.throws) {
2676
- return this.structuralMismatch('throws');
2677
- }
2678
- if (methodDeclaration.throws && otherMethodDeclaration.throws) {
2679
- yield this.visitContainer(methodDeclaration.throws, otherMethodDeclaration.throws);
2680
- if (!this.match)
2681
- return methodDeclaration;
2682
- }
2683
- // Visit body if present
2684
- if (!!methodDeclaration.body !== !!otherMethodDeclaration.body) {
2685
- return this.structuralMismatch('body');
2686
- }
2687
- if (methodDeclaration.body && otherMethodDeclaration.body) {
2688
- yield this.visit(methodDeclaration.body, otherMethodDeclaration.body);
2689
- if (!this.match)
2690
- return methodDeclaration;
2691
- }
2692
- return methodDeclaration;
2693
- });
2350
+ }
2351
+ return methodDeclaration;
2694
2352
  }
2695
2353
  /**
2696
2354
  * Override visitVoid to allow semantic equivalence with undefined identifier.
@@ -2702,24 +2360,19 @@ class JavaScriptSemanticComparatorVisitor extends JavaScriptComparatorVisitor {
2702
2360
  * - `void(0)` matches `undefined`
2703
2361
  * - `void 1` matches `undefined`
2704
2362
  */
2705
- visitVoid(voidExpr, other) {
2706
- const _super = Object.create(null, {
2707
- visitVoid: { get: () => super.visitVoid }
2708
- });
2709
- return __awaiter(this, void 0, void 0, function* () {
2710
- if (!this.match)
2363
+ async visitVoid(voidExpr, other) {
2364
+ if (!this.match)
2365
+ return voidExpr;
2366
+ // Check if the other is an undefined identifier
2367
+ if (other.kind === java_1.J.Kind.Identifier) {
2368
+ const identifier = other;
2369
+ if (identifier.simpleName === 'undefined') {
2370
+ // Both evaluate to undefined, so they match
2711
2371
  return voidExpr;
2712
- // Check if the other is an undefined identifier
2713
- if (other.kind === java_1.J.Kind.Identifier) {
2714
- const identifier = other;
2715
- if (identifier.simpleName === 'undefined') {
2716
- // Both evaluate to undefined, so they match
2717
- return voidExpr;
2718
- }
2719
2372
  }
2720
- // Otherwise delegate to parent
2721
- return _super.visitVoid.call(this, voidExpr, other);
2722
- });
2373
+ }
2374
+ // Otherwise delegate to parent
2375
+ return super.visitVoid(voidExpr, other);
2723
2376
  }
2724
2377
  /**
2725
2378
  * Override visitLiteral to allow semantic equivalence between
@@ -2731,26 +2384,21 @@ class JavaScriptSemanticComparatorVisitor extends JavaScriptComparatorVisitor {
2731
2384
  * - `255` matches `0b11111111`
2732
2385
  * - `1000` matches `1e3`
2733
2386
  */
2734
- visitLiteral(literal, other) {
2735
- const _super = Object.create(null, {
2736
- visitLiteral: { get: () => super.visitLiteral }
2737
- });
2738
- return __awaiter(this, void 0, void 0, function* () {
2739
- if (!this.match)
2740
- return literal;
2741
- if (other.kind !== java_1.J.Kind.Literal) {
2742
- return yield _super.visitLiteral.call(this, literal, other);
2743
- }
2744
- const otherLiteral = other;
2745
- // Only compare value and type, ignoring valueSource (text representation) and unicodeEscapes
2746
- yield this.visitProperty(literal.value, otherLiteral.value, 'value');
2747
- if (!this.match)
2748
- return literal;
2749
- yield this.visitProperty(literal.type, otherLiteral.type, 'type');
2750
- if (!this.match)
2751
- return literal;
2387
+ async visitLiteral(literal, other) {
2388
+ if (!this.match)
2389
+ return literal;
2390
+ if (other.kind !== java_1.J.Kind.Literal) {
2391
+ return await super.visitLiteral(literal, other);
2392
+ }
2393
+ const otherLiteral = other;
2394
+ // Only compare value and type, ignoring valueSource (text representation) and unicodeEscapes
2395
+ await this.visitProperty(literal.value, otherLiteral.value, 'value');
2396
+ if (!this.match)
2397
+ return literal;
2398
+ await this.visitProperty(literal.type, otherLiteral.type, 'type');
2399
+ if (!this.match)
2752
2400
  return literal;
2753
- });
2401
+ return literal;
2754
2402
  }
2755
2403
  }
2756
2404
  exports.JavaScriptSemanticComparatorVisitor = JavaScriptSemanticComparatorVisitor;