@openrewrite/rewrite 0.31.0 → 0.32.0

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.
@@ -94,7 +94,7 @@ class JavaVisitor extends core_1.TreeVisitor {
94
94
  arrayType = arrayType.withMarkers(this.visitMarkers(arrayType.markers, p));
95
95
  arrayType = arrayType.withElementType(this.visitAndCast(arrayType.elementType, p));
96
96
  arrayType = arrayType.withAnnotations(core_1.ListUtils.map(arrayType.annotations, el => this.visitAndCast(el, p)));
97
- arrayType = arrayType.withDimension(arrayType.dimension == null ? null : arrayType.dimension.withBefore(this.visitSpace(arrayType.dimension.before, 35, p)).withElement(this.visitSpace(arrayType.dimension.element, 36, p)));
97
+ arrayType = arrayType.withDimension(arrayType.dimension == null ? null : arrayType.dimension.withBefore(this.visitSpace(arrayType.dimension.before, 37, p)).withElement(this.visitSpace(arrayType.dimension.element, 38, p)));
98
98
  return arrayType;
99
99
  }
100
100
  visitAssert(assert, p) {
@@ -196,7 +196,7 @@ class JavaVisitor extends core_1.TreeVisitor {
196
196
  return _case;
197
197
  }
198
198
  visitClassDeclaration(classDeclaration, p) {
199
- classDeclaration = classDeclaration.withPrefix(this.visitSpace(classDeclaration.prefix, 29, p));
199
+ classDeclaration = classDeclaration.withPrefix(this.visitSpace(classDeclaration.prefix, 31, p));
200
200
  let tempStatement = this.visitStatement(classDeclaration, p);
201
201
  if (!(tempStatement instanceof tree_2.ClassDeclaration)) {
202
202
  return tempStatement;
@@ -216,22 +216,22 @@ class JavaVisitor extends core_1.TreeVisitor {
216
216
  return classDeclaration;
217
217
  }
218
218
  visitClassDeclarationKind(kind, p) {
219
- kind = kind.withPrefix(this.visitSpace(kind.prefix, 30, p));
219
+ kind = kind.withPrefix(this.visitSpace(kind.prefix, 32, p));
220
220
  kind = kind.withMarkers(this.visitMarkers(kind.markers, p));
221
221
  kind = kind.withAnnotations(core_1.ListUtils.map(kind.annotations, el => this.visitAndCast(el, p)));
222
222
  return kind;
223
223
  }
224
224
  visitCompilationUnit(compilationUnit, p) {
225
- compilationUnit = compilationUnit.withPrefix(this.visitSpace(compilationUnit.prefix, 32, p));
225
+ compilationUnit = compilationUnit.withPrefix(this.visitSpace(compilationUnit.prefix, 34, p));
226
226
  compilationUnit = compilationUnit.withMarkers(this.visitMarkers(compilationUnit.markers, p));
227
227
  compilationUnit = compilationUnit.padding.withPackageDeclaration(this.visitRightPadded(compilationUnit.padding.packageDeclaration, tree_1.JRightPadded.Location.PACKAGE, p));
228
228
  compilationUnit = compilationUnit.padding.withImports(core_1.ListUtils.map(compilationUnit.padding.imports, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.IMPORT, p)));
229
229
  compilationUnit = compilationUnit.withClasses(core_1.ListUtils.map(compilationUnit.classes, el => this.visitAndCast(el, p)));
230
- compilationUnit = compilationUnit.withEof(this.visitSpace(compilationUnit.eof, 31, p));
230
+ compilationUnit = compilationUnit.withEof(this.visitSpace(compilationUnit.eof, 33, p));
231
231
  return compilationUnit;
232
232
  }
233
233
  visitContinue(_continue, p) {
234
- _continue = _continue.withPrefix(this.visitSpace(_continue.prefix, 33, p));
234
+ _continue = _continue.withPrefix(this.visitSpace(_continue.prefix, 35, p));
235
235
  let tempStatement = this.visitStatement(_continue, p);
236
236
  if (!(tempStatement instanceof tree_2.Continue)) {
237
237
  return tempStatement;
@@ -242,7 +242,7 @@ class JavaVisitor extends core_1.TreeVisitor {
242
242
  return _continue;
243
243
  }
244
244
  visitDoWhileLoop(doWhileLoop, p) {
245
- doWhileLoop = doWhileLoop.withPrefix(this.visitSpace(doWhileLoop.prefix, 38, p));
245
+ doWhileLoop = doWhileLoop.withPrefix(this.visitSpace(doWhileLoop.prefix, 40, p));
246
246
  let tempStatement = this.visitStatement(doWhileLoop, p);
247
247
  if (!(tempStatement instanceof tree_2.DoWhileLoop)) {
248
248
  return tempStatement;
@@ -254,7 +254,7 @@ class JavaVisitor extends core_1.TreeVisitor {
254
254
  return doWhileLoop;
255
255
  }
256
256
  visitEmpty(empty, p) {
257
- empty = empty.withPrefix(this.visitSpace(empty.prefix, 40, p));
257
+ empty = empty.withPrefix(this.visitSpace(empty.prefix, 42, p));
258
258
  let tempStatement = this.visitStatement(empty, p);
259
259
  if (!(tempStatement instanceof tree_2.Empty)) {
260
260
  return tempStatement;
@@ -269,7 +269,7 @@ class JavaVisitor extends core_1.TreeVisitor {
269
269
  return empty;
270
270
  }
271
271
  visitEnumValue(enumValue, p) {
272
- enumValue = enumValue.withPrefix(this.visitSpace(enumValue.prefix, 41, p));
272
+ enumValue = enumValue.withPrefix(this.visitSpace(enumValue.prefix, 43, p));
273
273
  enumValue = enumValue.withMarkers(this.visitMarkers(enumValue.markers, p));
274
274
  enumValue = enumValue.withAnnotations(core_1.ListUtils.map(enumValue.annotations, el => this.visitAndCast(el, p)));
275
275
  enumValue = enumValue.withName(this.visitAndCast(enumValue.name, p));
@@ -277,7 +277,7 @@ class JavaVisitor extends core_1.TreeVisitor {
277
277
  return enumValue;
278
278
  }
279
279
  visitEnumValueSet(enumValueSet, p) {
280
- enumValueSet = enumValueSet.withPrefix(this.visitSpace(enumValueSet.prefix, 42, p));
280
+ enumValueSet = enumValueSet.withPrefix(this.visitSpace(enumValueSet.prefix, 44, p));
281
281
  let tempStatement = this.visitStatement(enumValueSet, p);
282
282
  if (!(tempStatement instanceof tree_2.EnumValueSet)) {
283
283
  return tempStatement;
@@ -288,7 +288,7 @@ class JavaVisitor extends core_1.TreeVisitor {
288
288
  return enumValueSet;
289
289
  }
290
290
  visitFieldAccess(fieldAccess, p) {
291
- fieldAccess = fieldAccess.withPrefix(this.visitSpace(fieldAccess.prefix, 47, p));
291
+ fieldAccess = fieldAccess.withPrefix(this.visitSpace(fieldAccess.prefix, 49, p));
292
292
  let tempStatement = this.visitStatement(fieldAccess, p);
293
293
  if (!(tempStatement instanceof tree_2.FieldAccess)) {
294
294
  return tempStatement;
@@ -305,7 +305,7 @@ class JavaVisitor extends core_1.TreeVisitor {
305
305
  return fieldAccess;
306
306
  }
307
307
  visitForEachLoop(forEachLoop, p) {
308
- forEachLoop = forEachLoop.withPrefix(this.visitSpace(forEachLoop.prefix, 54, p));
308
+ forEachLoop = forEachLoop.withPrefix(this.visitSpace(forEachLoop.prefix, 56, p));
309
309
  let tempStatement = this.visitStatement(forEachLoop, p);
310
310
  if (!(tempStatement instanceof tree_2.ForEachLoop)) {
311
311
  return tempStatement;
@@ -317,14 +317,14 @@ class JavaVisitor extends core_1.TreeVisitor {
317
317
  return forEachLoop;
318
318
  }
319
319
  visitForEachControl(control, p) {
320
- control = control.withPrefix(this.visitSpace(control.prefix, 53, p));
320
+ control = control.withPrefix(this.visitSpace(control.prefix, 55, p));
321
321
  control = control.withMarkers(this.visitMarkers(control.markers, p));
322
322
  control = control.padding.withVariable(this.visitRightPadded(control.padding.variable, tree_1.JRightPadded.Location.FOREACH_VARIABLE, p));
323
323
  control = control.padding.withIterable(this.visitRightPadded(control.padding.iterable, tree_1.JRightPadded.Location.FOREACH_ITERABLE, p));
324
324
  return control;
325
325
  }
326
326
  visitForLoop(forLoop, p) {
327
- forLoop = forLoop.withPrefix(this.visitSpace(forLoop.prefix, 56, p));
327
+ forLoop = forLoop.withPrefix(this.visitSpace(forLoop.prefix, 58, p));
328
328
  let tempStatement = this.visitStatement(forLoop, p);
329
329
  if (!(tempStatement instanceof tree_2.ForLoop)) {
330
330
  return tempStatement;
@@ -336,7 +336,7 @@ class JavaVisitor extends core_1.TreeVisitor {
336
336
  return forLoop;
337
337
  }
338
338
  visitForControl(control, p) {
339
- control = control.withPrefix(this.visitSpace(control.prefix, 52, p));
339
+ control = control.withPrefix(this.visitSpace(control.prefix, 54, p));
340
340
  control = control.withMarkers(this.visitMarkers(control.markers, p));
341
341
  control = control.padding.withInit(core_1.ListUtils.map(control.padding.init, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.FOR_INIT, p)));
342
342
  control = control.padding.withCondition(this.visitRightPadded(control.padding.condition, tree_1.JRightPadded.Location.FOR_CONDITION, p));
@@ -344,7 +344,7 @@ class JavaVisitor extends core_1.TreeVisitor {
344
344
  return control;
345
345
  }
346
346
  visitParenthesizedTypeTree(parenthesizedTypeTree, p) {
347
- parenthesizedTypeTree = parenthesizedTypeTree.withPrefix(this.visitSpace(parenthesizedTypeTree.prefix, 107, p));
347
+ parenthesizedTypeTree = parenthesizedTypeTree.withPrefix(this.visitSpace(parenthesizedTypeTree.prefix, 109, p));
348
348
  let tempExpression = this.visitExpression(parenthesizedTypeTree, p);
349
349
  if (!(tempExpression instanceof tree_2.ParenthesizedTypeTree)) {
350
350
  return tempExpression;
@@ -356,7 +356,7 @@ class JavaVisitor extends core_1.TreeVisitor {
356
356
  return parenthesizedTypeTree;
357
357
  }
358
358
  visitIdentifier(identifier, p) {
359
- identifier = identifier.withPrefix(this.visitSpace(identifier.prefix, 58, p));
359
+ identifier = identifier.withPrefix(this.visitSpace(identifier.prefix, 60, p));
360
360
  let tempExpression = this.visitExpression(identifier, p);
361
361
  if (!(tempExpression instanceof tree_2.Identifier)) {
362
362
  return tempExpression;
@@ -367,7 +367,7 @@ class JavaVisitor extends core_1.TreeVisitor {
367
367
  return identifier;
368
368
  }
369
369
  visitIf(_if, p) {
370
- _if = _if.withPrefix(this.visitSpace(_if.prefix, 60, p));
370
+ _if = _if.withPrefix(this.visitSpace(_if.prefix, 62, p));
371
371
  let tempStatement = this.visitStatement(_if, p);
372
372
  if (!(tempStatement instanceof tree_2.If)) {
373
373
  return tempStatement;
@@ -380,13 +380,13 @@ class JavaVisitor extends core_1.TreeVisitor {
380
380
  return _if;
381
381
  }
382
382
  visitElse(_else, p) {
383
- _else = _else.withPrefix(this.visitSpace(_else.prefix, 39, p));
383
+ _else = _else.withPrefix(this.visitSpace(_else.prefix, 41, p));
384
384
  _else = _else.withMarkers(this.visitMarkers(_else.markers, p));
385
385
  _else = _else.padding.withBody(this.visitRightPadded(_else.padding.body, tree_1.JRightPadded.Location.IF_ELSE, p));
386
386
  return _else;
387
387
  }
388
388
  visitImport(_import, p) {
389
- _import = _import.withPrefix(this.visitSpace(_import.prefix, 66, p));
389
+ _import = _import.withPrefix(this.visitSpace(_import.prefix, 68, p));
390
390
  let tempStatement = this.visitStatement(_import, p);
391
391
  if (!(tempStatement instanceof tree_2.Import)) {
392
392
  return tempStatement;
@@ -399,7 +399,7 @@ class JavaVisitor extends core_1.TreeVisitor {
399
399
  return _import;
400
400
  }
401
401
  visitInstanceOf(instanceOf, p) {
402
- instanceOf = instanceOf.withPrefix(this.visitSpace(instanceOf.prefix, 68, p));
402
+ instanceOf = instanceOf.withPrefix(this.visitSpace(instanceOf.prefix, 70, p));
403
403
  let tempExpression = this.visitExpression(instanceOf, p);
404
404
  if (!(tempExpression instanceof tree_2.InstanceOf)) {
405
405
  return tempExpression;
@@ -412,14 +412,14 @@ class JavaVisitor extends core_1.TreeVisitor {
412
412
  return instanceOf;
413
413
  }
414
414
  visitDeconstructionPattern(deconstructionPattern, p) {
415
- deconstructionPattern = deconstructionPattern.withPrefix(this.visitSpace(deconstructionPattern.prefix, 152, p));
415
+ deconstructionPattern = deconstructionPattern.withPrefix(this.visitSpace(deconstructionPattern.prefix, 154, p));
416
416
  deconstructionPattern = deconstructionPattern.withMarkers(this.visitMarkers(deconstructionPattern.markers, p));
417
417
  deconstructionPattern = deconstructionPattern.withDeconstructor(this.visitAndCast(deconstructionPattern.deconstructor, p));
418
418
  deconstructionPattern = deconstructionPattern.padding.withNested(this.visitContainer(deconstructionPattern.padding.nested, tree_1.JContainer.Location.DECONSTRUCTION_PATTERN_NESTED, p));
419
419
  return deconstructionPattern;
420
420
  }
421
421
  visitIntersectionType(intersectionType, p) {
422
- intersectionType = intersectionType.withPrefix(this.visitSpace(intersectionType.prefix, 70, p));
422
+ intersectionType = intersectionType.withPrefix(this.visitSpace(intersectionType.prefix, 72, p));
423
423
  let tempExpression = this.visitExpression(intersectionType, p);
424
424
  if (!(tempExpression instanceof tree_2.IntersectionType)) {
425
425
  return tempExpression;
@@ -430,7 +430,7 @@ class JavaVisitor extends core_1.TreeVisitor {
430
430
  return intersectionType;
431
431
  }
432
432
  visitLabel(label, p) {
433
- label = label.withPrefix(this.visitSpace(label.prefix, 71, p));
433
+ label = label.withPrefix(this.visitSpace(label.prefix, 73, p));
434
434
  let tempStatement = this.visitStatement(label, p);
435
435
  if (!(tempStatement instanceof tree_2.Label)) {
436
436
  return tempStatement;
@@ -442,7 +442,7 @@ class JavaVisitor extends core_1.TreeVisitor {
442
442
  return label;
443
443
  }
444
444
  visitLambda(lambda, p) {
445
- lambda = lambda.withPrefix(this.visitSpace(lambda.prefix, 76, p));
445
+ lambda = lambda.withPrefix(this.visitSpace(lambda.prefix, 78, p));
446
446
  let tempStatement = this.visitStatement(lambda, p);
447
447
  if (!(tempStatement instanceof tree_2.Lambda)) {
448
448
  return tempStatement;
@@ -455,18 +455,18 @@ class JavaVisitor extends core_1.TreeVisitor {
455
455
  lambda = tempExpression;
456
456
  lambda = lambda.withMarkers(this.visitMarkers(lambda.markers, p));
457
457
  lambda = lambda.withParameters(this.visitAndCast(lambda.parameters, p));
458
- lambda = lambda.withArrow(this.visitSpace(lambda.arrow, 73, p));
458
+ lambda = lambda.withArrow(this.visitSpace(lambda.arrow, 75, p));
459
459
  lambda = lambda.withBody(this.visitAndCast(lambda.body, p));
460
460
  return lambda;
461
461
  }
462
462
  visitLambdaParameters(parameters, p) {
463
- parameters = parameters.withPrefix(this.visitSpace(parameters.prefix, 75, p));
463
+ parameters = parameters.withPrefix(this.visitSpace(parameters.prefix, 77, p));
464
464
  parameters = parameters.withMarkers(this.visitMarkers(parameters.markers, p));
465
465
  parameters = parameters.padding.withParameters(core_1.ListUtils.map(parameters.padding.parameters, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.LAMBDA_PARAM, p)));
466
466
  return parameters;
467
467
  }
468
468
  visitLiteral(literal, p) {
469
- literal = literal.withPrefix(this.visitSpace(literal.prefix, 78, p));
469
+ literal = literal.withPrefix(this.visitSpace(literal.prefix, 80, p));
470
470
  let tempExpression = this.visitExpression(literal, p);
471
471
  if (!(tempExpression instanceof tree_2.Literal)) {
472
472
  return tempExpression;
@@ -476,7 +476,7 @@ class JavaVisitor extends core_1.TreeVisitor {
476
476
  return literal;
477
477
  }
478
478
  visitMemberReference(memberReference, p) {
479
- memberReference = memberReference.withPrefix(this.visitSpace(memberReference.prefix, 81, p));
479
+ memberReference = memberReference.withPrefix(this.visitSpace(memberReference.prefix, 83, p));
480
480
  let tempExpression = this.visitExpression(memberReference, p);
481
481
  if (!(tempExpression instanceof tree_2.MemberReference)) {
482
482
  return tempExpression;
@@ -489,7 +489,7 @@ class JavaVisitor extends core_1.TreeVisitor {
489
489
  return memberReference;
490
490
  }
491
491
  visitMethodDeclaration(methodDeclaration, p) {
492
- methodDeclaration = methodDeclaration.withPrefix(this.visitSpace(methodDeclaration.prefix, 85, p));
492
+ methodDeclaration = methodDeclaration.withPrefix(this.visitSpace(methodDeclaration.prefix, 87, p));
493
493
  let tempStatement = this.visitStatement(methodDeclaration, p);
494
494
  if (!(tempStatement instanceof tree_2.MethodDeclaration)) {
495
495
  return tempStatement;
@@ -508,7 +508,7 @@ class JavaVisitor extends core_1.TreeVisitor {
508
508
  return methodDeclaration;
509
509
  }
510
510
  visitMethodInvocation(methodInvocation, p) {
511
- methodInvocation = methodInvocation.withPrefix(this.visitSpace(methodInvocation.prefix, 89, p));
511
+ methodInvocation = methodInvocation.withPrefix(this.visitSpace(methodInvocation.prefix, 91, p));
512
512
  let tempStatement = this.visitStatement(methodInvocation, p);
513
513
  if (!(tempStatement instanceof tree_2.MethodInvocation)) {
514
514
  return tempStatement;
@@ -527,19 +527,19 @@ class JavaVisitor extends core_1.TreeVisitor {
527
527
  return methodInvocation;
528
528
  }
529
529
  visitModifier(modifier, p) {
530
- modifier = modifier.withPrefix(this.visitSpace(modifier.prefix, 91, p));
530
+ modifier = modifier.withPrefix(this.visitSpace(modifier.prefix, 93, p));
531
531
  modifier = modifier.withMarkers(this.visitMarkers(modifier.markers, p));
532
532
  modifier = modifier.withAnnotations(core_1.ListUtils.map(modifier.annotations, el => this.visitAndCast(el, p)));
533
533
  return modifier;
534
534
  }
535
535
  visitMultiCatch(multiCatch, p) {
536
- multiCatch = multiCatch.withPrefix(this.visitSpace(multiCatch.prefix, 92, p));
536
+ multiCatch = multiCatch.withPrefix(this.visitSpace(multiCatch.prefix, 94, p));
537
537
  multiCatch = multiCatch.withMarkers(this.visitMarkers(multiCatch.markers, p));
538
538
  multiCatch = multiCatch.padding.withAlternatives(core_1.ListUtils.map(multiCatch.padding.alternatives, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.CATCH_ALTERNATIVE, p)));
539
539
  return multiCatch;
540
540
  }
541
541
  visitNewArray(newArray, p) {
542
- newArray = newArray.withPrefix(this.visitSpace(newArray.prefix, 96, p));
542
+ newArray = newArray.withPrefix(this.visitSpace(newArray.prefix, 98, p));
543
543
  let tempExpression = this.visitExpression(newArray, p);
544
544
  if (!(tempExpression instanceof tree_2.NewArray)) {
545
545
  return tempExpression;
@@ -552,13 +552,13 @@ class JavaVisitor extends core_1.TreeVisitor {
552
552
  return newArray;
553
553
  }
554
554
  visitArrayDimension(arrayDimension, p) {
555
- arrayDimension = arrayDimension.withPrefix(this.visitSpace(arrayDimension.prefix, 35, p));
555
+ arrayDimension = arrayDimension.withPrefix(this.visitSpace(arrayDimension.prefix, 37, p));
556
556
  arrayDimension = arrayDimension.withMarkers(this.visitMarkers(arrayDimension.markers, p));
557
557
  arrayDimension = arrayDimension.padding.withIndex(this.visitRightPadded(arrayDimension.padding.index, tree_1.JRightPadded.Location.ARRAY_INDEX, p));
558
558
  return arrayDimension;
559
559
  }
560
560
  visitNewClass(newClass, p) {
561
- newClass = newClass.withPrefix(this.visitSpace(newClass.prefix, 100, p));
561
+ newClass = newClass.withPrefix(this.visitSpace(newClass.prefix, 102, p));
562
562
  let tempStatement = this.visitStatement(newClass, p);
563
563
  if (!(tempStatement instanceof tree_2.NewClass)) {
564
564
  return tempStatement;
@@ -571,14 +571,14 @@ class JavaVisitor extends core_1.TreeVisitor {
571
571
  newClass = tempExpression;
572
572
  newClass = newClass.withMarkers(this.visitMarkers(newClass.markers, p));
573
573
  newClass = newClass.padding.withEnclosing(this.visitRightPadded(newClass.padding.enclosing, tree_1.JRightPadded.Location.NEW_CLASS_ENCLOSING, p));
574
- newClass = newClass.withNew(this.visitSpace(newClass.new, 101, p));
574
+ newClass = newClass.withNew(this.visitSpace(newClass.new, 103, p));
575
575
  newClass = newClass.withClazz(this.visitAndCast(newClass.clazz, p));
576
576
  newClass = newClass.padding.withArguments(this.visitContainer(newClass.padding.arguments, tree_1.JContainer.Location.NEW_CLASS_ARGUMENTS, p));
577
577
  newClass = newClass.withBody(this.visitAndCast(newClass.body, p));
578
578
  return newClass;
579
579
  }
580
580
  visitNullableType(nullableType, p) {
581
- nullableType = nullableType.withPrefix(this.visitSpace(nullableType.prefix, 102, p));
581
+ nullableType = nullableType.withPrefix(this.visitSpace(nullableType.prefix, 104, p));
582
582
  let tempExpression = this.visitExpression(nullableType, p);
583
583
  if (!(tempExpression instanceof tree_2.NullableType)) {
584
584
  return tempExpression;
@@ -590,7 +590,7 @@ class JavaVisitor extends core_1.TreeVisitor {
590
590
  return nullableType;
591
591
  }
592
592
  visitPackage(_package, p) {
593
- _package = _package.withPrefix(this.visitSpace(_package.prefix, 104, p));
593
+ _package = _package.withPrefix(this.visitSpace(_package.prefix, 106, p));
594
594
  let tempStatement = this.visitStatement(_package, p);
595
595
  if (!(tempStatement instanceof tree_2.Package)) {
596
596
  return tempStatement;
@@ -602,7 +602,7 @@ class JavaVisitor extends core_1.TreeVisitor {
602
602
  return _package;
603
603
  }
604
604
  visitParameterizedType(parameterizedType, p) {
605
- parameterizedType = parameterizedType.withPrefix(this.visitSpace(parameterizedType.prefix, 106, p));
605
+ parameterizedType = parameterizedType.withPrefix(this.visitSpace(parameterizedType.prefix, 108, p));
606
606
  let tempExpression = this.visitExpression(parameterizedType, p);
607
607
  if (!(tempExpression instanceof tree_2.ParameterizedType)) {
608
608
  return tempExpression;
@@ -614,7 +614,7 @@ class JavaVisitor extends core_1.TreeVisitor {
614
614
  return parameterizedType;
615
615
  }
616
616
  visitParentheses(parentheses, p) {
617
- parentheses = parentheses.withPrefix(this.visitSpace(parentheses.prefix, 107, p));
617
+ parentheses = parentheses.withPrefix(this.visitSpace(parentheses.prefix, 109, p));
618
618
  let tempExpression = this.visitExpression(parentheses, p);
619
619
  if (!(tempExpression instanceof tree_2.Parentheses)) {
620
620
  return tempExpression;
@@ -625,7 +625,7 @@ class JavaVisitor extends core_1.TreeVisitor {
625
625
  return parentheses;
626
626
  }
627
627
  visitControlParentheses(controlParentheses, p) {
628
- controlParentheses = controlParentheses.withPrefix(this.visitSpace(controlParentheses.prefix, 34, p));
628
+ controlParentheses = controlParentheses.withPrefix(this.visitSpace(controlParentheses.prefix, 36, p));
629
629
  let tempExpression = this.visitExpression(controlParentheses, p);
630
630
  if (!(tempExpression instanceof tree_2.ControlParentheses)) {
631
631
  return tempExpression;
@@ -636,7 +636,7 @@ class JavaVisitor extends core_1.TreeVisitor {
636
636
  return controlParentheses;
637
637
  }
638
638
  visitPrimitive(primitive, p) {
639
- primitive = primitive.withPrefix(this.visitSpace(primitive.prefix, 110, p));
639
+ primitive = primitive.withPrefix(this.visitSpace(primitive.prefix, 112, p));
640
640
  let tempExpression = this.visitExpression(primitive, p);
641
641
  if (!(tempExpression instanceof tree_2.Primitive)) {
642
642
  return tempExpression;
@@ -646,7 +646,7 @@ class JavaVisitor extends core_1.TreeVisitor {
646
646
  return primitive;
647
647
  }
648
648
  visitReturn(_return, p) {
649
- _return = _return.withPrefix(this.visitSpace(_return.prefix, 113, p));
649
+ _return = _return.withPrefix(this.visitSpace(_return.prefix, 115, p));
650
650
  let tempStatement = this.visitStatement(_return, p);
651
651
  if (!(tempStatement instanceof tree_2.Return)) {
652
652
  return tempStatement;
@@ -657,7 +657,7 @@ class JavaVisitor extends core_1.TreeVisitor {
657
657
  return _return;
658
658
  }
659
659
  visitSwitch(_switch, p) {
660
- _switch = _switch.withPrefix(this.visitSpace(_switch.prefix, 117, p));
660
+ _switch = _switch.withPrefix(this.visitSpace(_switch.prefix, 119, p));
661
661
  let tempStatement = this.visitStatement(_switch, p);
662
662
  if (!(tempStatement instanceof tree_2.Switch)) {
663
663
  return tempStatement;
@@ -669,7 +669,7 @@ class JavaVisitor extends core_1.TreeVisitor {
669
669
  return _switch;
670
670
  }
671
671
  visitSwitchExpression(switchExpression, p) {
672
- switchExpression = switchExpression.withPrefix(this.visitSpace(switchExpression.prefix, 118, p));
672
+ switchExpression = switchExpression.withPrefix(this.visitSpace(switchExpression.prefix, 120, p));
673
673
  let tempExpression = this.visitExpression(switchExpression, p);
674
674
  if (!(tempExpression instanceof tree_2.SwitchExpression)) {
675
675
  return tempExpression;
@@ -681,7 +681,7 @@ class JavaVisitor extends core_1.TreeVisitor {
681
681
  return switchExpression;
682
682
  }
683
683
  visitSynchronized(synchronized, p) {
684
- synchronized = synchronized.withPrefix(this.visitSpace(synchronized.prefix, 119, p));
684
+ synchronized = synchronized.withPrefix(this.visitSpace(synchronized.prefix, 121, p));
685
685
  let tempStatement = this.visitStatement(synchronized, p);
686
686
  if (!(tempStatement instanceof tree_2.Synchronized)) {
687
687
  return tempStatement;
@@ -693,7 +693,7 @@ class JavaVisitor extends core_1.TreeVisitor {
693
693
  return synchronized;
694
694
  }
695
695
  visitTernary(ternary, p) {
696
- ternary = ternary.withPrefix(this.visitSpace(ternary.prefix, 121, p));
696
+ ternary = ternary.withPrefix(this.visitSpace(ternary.prefix, 123, p));
697
697
  let tempStatement = this.visitStatement(ternary, p);
698
698
  if (!(tempStatement instanceof tree_2.Ternary)) {
699
699
  return tempStatement;
@@ -711,7 +711,7 @@ class JavaVisitor extends core_1.TreeVisitor {
711
711
  return ternary;
712
712
  }
713
713
  visitThrow(_throw, p) {
714
- _throw = _throw.withPrefix(this.visitSpace(_throw.prefix, 125, p));
714
+ _throw = _throw.withPrefix(this.visitSpace(_throw.prefix, 127, p));
715
715
  let tempStatement = this.visitStatement(_throw, p);
716
716
  if (!(tempStatement instanceof tree_2.Throw)) {
717
717
  return tempStatement;
@@ -722,7 +722,7 @@ class JavaVisitor extends core_1.TreeVisitor {
722
722
  return _throw;
723
723
  }
724
724
  visitTry(_try, p) {
725
- _try = _try.withPrefix(this.visitSpace(_try.prefix, 127, p));
725
+ _try = _try.withPrefix(this.visitSpace(_try.prefix, 129, p));
726
726
  let tempStatement = this.visitStatement(_try, p);
727
727
  if (!(tempStatement instanceof tree_2.Try)) {
728
728
  return tempStatement;
@@ -736,20 +736,20 @@ class JavaVisitor extends core_1.TreeVisitor {
736
736
  return _try;
737
737
  }
738
738
  visitTryResource(resource, p) {
739
- resource = resource.withPrefix(this.visitSpace(resource.prefix, 128, p));
739
+ resource = resource.withPrefix(this.visitSpace(resource.prefix, 130, p));
740
740
  resource = resource.withMarkers(this.visitMarkers(resource.markers, p));
741
741
  resource = resource.withVariableDeclarations(this.visitAndCast(resource.variableDeclarations, p));
742
742
  return resource;
743
743
  }
744
744
  visitCatch(_catch, p) {
745
- _catch = _catch.withPrefix(this.visitSpace(_catch.prefix, 28, p));
745
+ _catch = _catch.withPrefix(this.visitSpace(_catch.prefix, 30, p));
746
746
  _catch = _catch.withMarkers(this.visitMarkers(_catch.markers, p));
747
747
  _catch = _catch.withParameter(this.visitAndCast(_catch.parameter, p));
748
748
  _catch = _catch.withBody(this.visitAndCast(_catch.body, p));
749
749
  return _catch;
750
750
  }
751
751
  visitTypeCast(typeCast, p) {
752
- typeCast = typeCast.withPrefix(this.visitSpace(typeCast.prefix, 133, p));
752
+ typeCast = typeCast.withPrefix(this.visitSpace(typeCast.prefix, 135, p));
753
753
  let tempExpression = this.visitExpression(typeCast, p);
754
754
  if (!(tempExpression instanceof tree_2.TypeCast)) {
755
755
  return tempExpression;
@@ -761,7 +761,7 @@ class JavaVisitor extends core_1.TreeVisitor {
761
761
  return typeCast;
762
762
  }
763
763
  visitTypeParameter(typeParameter, p) {
764
- typeParameter = typeParameter.withPrefix(this.visitSpace(typeParameter.prefix, 135, p));
764
+ typeParameter = typeParameter.withPrefix(this.visitSpace(typeParameter.prefix, 137, p));
765
765
  typeParameter = typeParameter.withMarkers(this.visitMarkers(typeParameter.markers, p));
766
766
  typeParameter = typeParameter.withAnnotations(core_1.ListUtils.map(typeParameter.annotations, el => this.visitAndCast(el, p)));
767
767
  typeParameter = typeParameter.withModifiers(core_1.ListUtils.map(typeParameter.modifiers, el => this.visitAndCast(el, p)));
@@ -770,14 +770,14 @@ class JavaVisitor extends core_1.TreeVisitor {
770
770
  return typeParameter;
771
771
  }
772
772
  visitTypeParameters(typeParameters, p) {
773
- typeParameters = typeParameters.withPrefix(this.visitSpace(typeParameters.prefix, 135, p));
773
+ typeParameters = typeParameters.withPrefix(this.visitSpace(typeParameters.prefix, 137, p));
774
774
  typeParameters = typeParameters.withMarkers(this.visitMarkers(typeParameters.markers, p));
775
775
  typeParameters = typeParameters.withAnnotations(core_1.ListUtils.map(typeParameters.annotations, el => this.visitAndCast(el, p)));
776
776
  typeParameters = typeParameters.padding.withTypeParameters(core_1.ListUtils.map(typeParameters.padding.typeParameters, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.TYPE_PARAMETER, p)));
777
777
  return typeParameters;
778
778
  }
779
779
  visitUnary(unary, p) {
780
- unary = unary.withPrefix(this.visitSpace(unary.prefix, 138, p));
780
+ unary = unary.withPrefix(this.visitSpace(unary.prefix, 140, p));
781
781
  let tempStatement = this.visitStatement(unary, p);
782
782
  if (!(tempStatement instanceof tree_2.Unary)) {
783
783
  return tempStatement;
@@ -794,7 +794,7 @@ class JavaVisitor extends core_1.TreeVisitor {
794
794
  return unary;
795
795
  }
796
796
  visitVariableDeclarations(variableDeclarations, p) {
797
- variableDeclarations = variableDeclarations.withPrefix(this.visitSpace(variableDeclarations.prefix, 142, p));
797
+ variableDeclarations = variableDeclarations.withPrefix(this.visitSpace(variableDeclarations.prefix, 144, p));
798
798
  let tempStatement = this.visitStatement(variableDeclarations, p);
799
799
  if (!(tempStatement instanceof tree_2.VariableDeclarations)) {
800
800
  return tempStatement;
@@ -804,21 +804,21 @@ class JavaVisitor extends core_1.TreeVisitor {
804
804
  variableDeclarations = variableDeclarations.withLeadingAnnotations(core_1.ListUtils.map(variableDeclarations.leadingAnnotations, el => this.visitAndCast(el, p)));
805
805
  variableDeclarations = variableDeclarations.withModifiers(core_1.ListUtils.map(variableDeclarations.modifiers, el => this.visitAndCast(el, p)));
806
806
  variableDeclarations = variableDeclarations.withTypeExpression(this.visitAndCast(variableDeclarations.typeExpression, p));
807
- variableDeclarations = variableDeclarations.withVarargs(this.visitSpace(variableDeclarations.varargs, 141, p));
808
- variableDeclarations = variableDeclarations.withDimensionsBeforeName(core_1.ListUtils.map(variableDeclarations.dimensionsBeforeName, el => el.withBefore(this.visitSpace(el.before, 35, p)).withElement(this.visitSpace(el.element, 36, p))));
807
+ variableDeclarations = variableDeclarations.withVarargs(this.visitSpace(variableDeclarations.varargs, 143, p));
808
+ variableDeclarations = variableDeclarations.withDimensionsBeforeName(core_1.ListUtils.map(variableDeclarations.dimensionsBeforeName, el => el.withBefore(this.visitSpace(el.before, 37, p)).withElement(this.visitSpace(el.element, 38, p))));
809
809
  variableDeclarations = variableDeclarations.padding.withVariables(core_1.ListUtils.map(variableDeclarations.padding.variables, el => this.visitRightPadded(el, tree_1.JRightPadded.Location.NAMED_VARIABLE, p)));
810
810
  return variableDeclarations;
811
811
  }
812
812
  visitVariable(namedVariable, p) {
813
- namedVariable = namedVariable.withPrefix(this.visitSpace(namedVariable.prefix, 144, p));
813
+ namedVariable = namedVariable.withPrefix(this.visitSpace(namedVariable.prefix, 146, p));
814
814
  namedVariable = namedVariable.withMarkers(this.visitMarkers(namedVariable.markers, p));
815
815
  namedVariable = namedVariable.withName(this.visitAndCast(namedVariable.name, p));
816
- namedVariable = namedVariable.withDimensionsAfterName(core_1.ListUtils.map(namedVariable.dimensionsAfterName, el => el.withBefore(this.visitSpace(el.before, 35, p)).withElement(this.visitSpace(el.element, 36, p))));
816
+ namedVariable = namedVariable.withDimensionsAfterName(core_1.ListUtils.map(namedVariable.dimensionsAfterName, el => el.withBefore(this.visitSpace(el.before, 37, p)).withElement(this.visitSpace(el.element, 38, p))));
817
817
  namedVariable = namedVariable.padding.withInitializer(this.visitLeftPadded(namedVariable.padding.initializer, tree_1.JLeftPadded.Location.VARIABLE_INITIALIZER, p));
818
818
  return namedVariable;
819
819
  }
820
820
  visitWhileLoop(whileLoop, p) {
821
- whileLoop = whileLoop.withPrefix(this.visitSpace(whileLoop.prefix, 147, p));
821
+ whileLoop = whileLoop.withPrefix(this.visitSpace(whileLoop.prefix, 149, p));
822
822
  let tempStatement = this.visitStatement(whileLoop, p);
823
823
  if (!(tempStatement instanceof tree_2.WhileLoop)) {
824
824
  return tempStatement;
@@ -830,7 +830,7 @@ class JavaVisitor extends core_1.TreeVisitor {
830
830
  return whileLoop;
831
831
  }
832
832
  visitWildcard(wildcard, p) {
833
- wildcard = wildcard.withPrefix(this.visitSpace(wildcard.prefix, 149, p));
833
+ wildcard = wildcard.withPrefix(this.visitSpace(wildcard.prefix, 151, p));
834
834
  let tempExpression = this.visitExpression(wildcard, p);
835
835
  if (!(tempExpression instanceof tree_2.Wildcard)) {
836
836
  return tempExpression;
@@ -842,7 +842,7 @@ class JavaVisitor extends core_1.TreeVisitor {
842
842
  return wildcard;
843
843
  }
844
844
  visitYield(_yield, p) {
845
- _yield = _yield.withPrefix(this.visitSpace(_yield.prefix, 150, p));
845
+ _yield = _yield.withPrefix(this.visitSpace(_yield.prefix, 152, p));
846
846
  let tempStatement = this.visitStatement(_yield, p);
847
847
  if (!(tempStatement instanceof tree_2.Yield)) {
848
848
  return tempStatement;
@@ -853,7 +853,7 @@ class JavaVisitor extends core_1.TreeVisitor {
853
853
  return _yield;
854
854
  }
855
855
  visitUnknown(unknown, p) {
856
- unknown = unknown.withPrefix(this.visitSpace(unknown.prefix, 139, p));
856
+ unknown = unknown.withPrefix(this.visitSpace(unknown.prefix, 141, p));
857
857
  let tempStatement = this.visitStatement(unknown, p);
858
858
  if (!(tempStatement instanceof tree_2.Unknown)) {
859
859
  return tempStatement;
@@ -869,12 +869,12 @@ class JavaVisitor extends core_1.TreeVisitor {
869
869
  return unknown;
870
870
  }
871
871
  visitUnknownSource(source, p) {
872
- source = source.withPrefix(this.visitSpace(source.prefix, 140, p));
872
+ source = source.withPrefix(this.visitSpace(source.prefix, 142, p));
873
873
  source = source.withMarkers(this.visitMarkers(source.markers, p));
874
874
  return source;
875
875
  }
876
876
  visitErroneous(erroneous, p) {
877
- erroneous = erroneous.withPrefix(this.visitSpace(erroneous.prefix, 151, p));
877
+ erroneous = erroneous.withPrefix(this.visitSpace(erroneous.prefix, 153, p));
878
878
  let tempStatement = this.visitStatement(erroneous, p);
879
879
  if (!(tempStatement instanceof tree_2.Erroneous)) {
880
880
  return tempStatement;
@@ -56,7 +56,7 @@ function visitRightPadded(v, right, loc, p) {
56
56
  return java_extensions.visitRightPadded(v, right, loc, p);
57
57
  }
58
58
  function visitJsSpace(v, space, loc, p) {
59
- return visitSpace(v, space, 77, p);
59
+ return visitSpace(v, space, 79, p);
60
60
  }
61
61
  function visitJsLeftPadded(v, left, loc, p) {
62
62
  return visitLeftPadded(v, left, tree_1.JLeftPadded.Location.LANGUAGE_EXTENSION, p);
@@ -3,4 +3,5 @@ export * from './parser';
3
3
  export * from './projectParser';
4
4
  export * from './tree';
5
5
  export * from './visitor';
6
+ export * from './printer';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/javascript/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/javascript/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC"}
@@ -19,4 +19,5 @@ __exportStar(require("./parser"), exports);
19
19
  __exportStar(require("./projectParser"), exports);
20
20
  __exportStar(require("./tree"), exports);
21
21
  __exportStar(require("./visitor"), exports);
22
+ __exportStar(require("./printer"), exports);
22
23
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/javascript/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,yCAAuB;AACvB,4CAA0B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/javascript/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,2CAAyB;AACzB,kDAAgC;AAChC,yCAAuB;AACvB,4CAA0B;AAC1B,4CAA0B"}
@@ -1088,7 +1088,7 @@ class JavaScriptParserVisitor {
1088
1088
  return new J.ForLoop((0, core_1.randomId)(), this.prefix(node), core_1.Markers.EMPTY, new J.ForLoop.Control((0, core_1.randomId)(), this.prefix(this.findChildNode(node, ts.SyntaxKind.OpenParenToken)), core_1.Markers.EMPTY, [node.initializer ?
1089
1089
  (ts.isVariableDeclarationList(node.initializer) ? this.rightPadded(this.visit(node.initializer), java_1.Space.EMPTY) :
1090
1090
  this.rightPadded(new _1.ExpressionStatement((0, core_1.randomId)(), this.visit(node.initializer)), this.suffix(node.initializer))) :
1091
- this.rightPadded(this.newJEmpty(), this.suffix(this.findChildNode(node, ts.SyntaxKind.OpenParenToken)))], node.condition ? this.rightPadded(ts.isStatement(node.condition) ? this.visit(node.condition) : new _1.ExpressionStatement((0, core_1.randomId)(), this.visit(node.condition)), this.suffix(node.condition)) :
1091
+ this.rightPadded(this.newJEmpty(), this.suffix(this.findChildNode(node, ts.SyntaxKind.OpenParenToken)))], node.condition ? this.rightPadded(this.visit(node.condition), this.suffix(node.condition)) :
1092
1092
  this.rightPadded(this.newJEmpty(), this.suffix(this.findChildNode(node, ts.SyntaxKind.SemicolonToken))), [node.incrementor ? this.rightPadded(ts.isStatement(node.incrementor) ? this.visit(node.incrementor) : new _1.ExpressionStatement((0, core_1.randomId)(), this.visit(node.incrementor)), this.suffix(node.incrementor)) :
1093
1093
  this.rightPadded(this.newJEmpty(this.prefix(this.findChildNode(node, ts.SyntaxKind.CloseParenToken))), java_1.Space.EMPTY)]), this.rightPadded(this.convert(node.statement), this.semicolonPrefix(node.statement), ((_a = node.statement.getChildAt(node.statement.getChildCount() - 1)) === null || _a === void 0 ? void 0 : _a.kind) == ts.SyntaxKind.SemicolonToken ? core_1.Markers.build([new java_1.Semicolon((0, core_1.randomId)())]) : core_1.Markers.EMPTY));
1094
1094
  }