Skip to content

Commit

Permalink
Override printStatementTerminator() in GroovyPrinter
Browse files Browse the repository at this point in the history
  • Loading branch information
knutwannheden committed Jun 19, 2024
1 parent 954d79b commit cfd15b6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -397,12 +397,9 @@ public J visitReturn(J.Return return_, PrintOutputCapture<P> p) {
return super.visitReturn(return_, p);
}

protected void visitStatement(@Nullable JRightPadded<Statement> paddedStat, JRightPadded.Location location, PrintOutputCapture<P> p) {
if (paddedStat != null) {
visit(paddedStat.getElement(), p);
visitSpace(paddedStat.getAfter(), location.getAfterLocation(), p);
visitMarkers(paddedStat.getMarkers(), p);
}
@Override
protected void printStatementTerminator(Statement s, PrintOutputCapture<P> p) {
// empty
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,8 @@ protected void visitStatement(@Nullable JRightPadded<Statement> paddedStat, JRig

visit(paddedStat.getElement(), p);
visitSpace(paddedStat.getAfter(), location.getAfterLocation(), p);
printStatementTerminator(paddedStat.getElement(), p);
visitMarkers(paddedStat.getMarkers(), p);
printStatementTerminator(paddedStat.getElement(), p);
}

protected void printStatementTerminator(Statement s, PrintOutputCapture<P> p) {
Expand Down

0 comments on commit cfd15b6

Please sign in to comment.