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

Commit be059e0

Browse files
authored
Have JavaPrinter print TrailingComma marker (#191)
1 parent ed84b0b commit be059e0

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

rewrite-javascript/src/main/java/org/openrewrite/javascript/internal/JavaScriptPrinter.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,10 +1412,7 @@ protected void visitStatement(@Nullable JRightPadded<Statement> paddedStat, JRig
14121412

14131413
@Override
14141414
public <M extends Marker> M visitMarker(Marker marker, PrintOutputCapture<P> p) {
1415-
if (marker instanceof TrailingComma) {
1416-
p.append(",");
1417-
visitSpace(((TrailingComma) marker).getSuffix(), Space.Location.LANGUAGE_EXTENSION, p);
1418-
} else if (marker instanceof Semicolon) {
1415+
if (marker instanceof Semicolon) {
14191416
p.append(';');
14201417
}
14211418
return super.visitMarker(marker, p);

0 commit comments

Comments
 (0)