Skip to content

Commit

Permalink
TrailingComma is now printed in super.visitMarker (#623)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtebeek authored Jan 9, 2025
1 parent a034441 commit 1f7b104
Showing 1 changed file with 0 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1257,13 +1257,7 @@ protected void visitStatement(@Nullable JRightPadded<Statement> paddedStat, JRig
public <M extends Marker> M visitMarker(Marker marker, PrintOutputCapture<P> p) {
if (marker instanceof Semicolon) {
p.append(';');
} else if (marker instanceof TrailingComma) {
// TODO consider adding cursor message to only print for last element in list
// TODO the space should then probably be printed anyway (could contain a comment)
p.append(',');
visitSpace(((TrailingComma) marker).getSuffix(), Space.Location.LANGUAGE_EXTENSION, p);
}

return super.visitMarker(marker, p);
}

Expand Down

0 comments on commit 1f7b104

Please sign in to comment.