Skip to content

Commit

Permalink
Have JavaPrinter print TrailingComma marker (#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek authored Jan 10, 2025
1 parent ed84b0b commit be059e0
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1412,10 +1412,7 @@ protected void visitStatement(@Nullable JRightPadded<Statement> paddedStat, JRig

@Override
public <M extends Marker> M visitMarker(Marker marker, PrintOutputCapture<P> p) {
if (marker instanceof TrailingComma) {
p.append(",");
visitSpace(((TrailingComma) marker).getSuffix(), Space.Location.LANGUAGE_EXTENSION, p);
} else if (marker instanceof Semicolon) {
if (marker instanceof Semicolon) {
p.append(';');
}
return super.visitMarker(marker, p);
Expand Down

0 comments on commit be059e0

Please sign in to comment.