Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

Commit 1f7b104

Browse files
authored
TrailingComma is now printed in super.visitMarker (#623)
1 parent a034441 commit 1f7b104

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

src/main/java/org/openrewrite/kotlin/internal/KotlinPrinter.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,13 +1257,7 @@ protected void visitStatement(@Nullable JRightPadded<Statement> paddedStat, JRig
12571257
public <M extends Marker> M visitMarker(Marker marker, PrintOutputCapture<P> p) {
12581258
if (marker instanceof Semicolon) {
12591259
p.append(';');
1260-
} else if (marker instanceof TrailingComma) {
1261-
// TODO consider adding cursor message to only print for last element in list
1262-
// TODO the space should then probably be printed anyway (could contain a comment)
1263-
p.append(',');
1264-
visitSpace(((TrailingComma) marker).getSuffix(), Space.Location.LANGUAGE_EXTENSION, p);
12651260
}
1266-
12671261
return super.visitMarker(marker, p);
12681262
}
12691263

0 commit comments

Comments
 (0)