Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Laurens-W committed Dec 18, 2024
1 parent e2afd71 commit bd4ca6d
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,12 @@ private Expression insideParentheses(ASTNode node, Supplier<Expression> parenthe
}
return parenthesized;
}
return parenthesizedTree.get();
Expression parenthesized = parenthesizedTree.get();
if (this.nodeCursor.getValue() != null && this.nodeCursor.getValue() instanceof BooleanExpression && node instanceof MethodCallExpression && source.charAt(cursor) == ')') {
parenthesized = new J.Parentheses<>(randomId(), openingParens.pop(), Markers.EMPTY,
padRight(parenthesized, sourceBefore(")")));
}
return parenthesized;
}

private Statement labeled(org.codehaus.groovy.ast.stmt.Statement statement, Supplier<Statement> labeledTree) {
Expand Down

0 comments on commit bd4ca6d

Please sign in to comment.