Skip to content
Prev Previous commit
Next Next commit
Formatting
  • Loading branch information
rcosta358 committed Apr 1, 2026
commit 76041fe24606b832e8442d7e9219224e12c79456
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
import liquidjava.utils.Utils;

/**
* Formatter expressions that preserves only the parentheses required by precedence and associativity rules
* Also formats variable names using {@link VariableFormatter}
* Formatter for expressions that only adds parentheses when required by precedence and associativity rules and formats
* variable names using {@link VariableFormatter}
*/
public class ExpressionFormatter implements ExpressionVisitor<String> {

Expand Down Expand Up @@ -55,8 +55,7 @@ private String formatCondition(Expression child) {
}

private String formatArguments(List<Expression> args) {
return args.stream().map(expression -> formatParentheses(expression, false))
.collect(Collectors.joining(", "));
return args.stream().map(expression -> formatParentheses(expression, false)).collect(Collectors.joining(", "));
}

private boolean needsParentheses(Expression parent, Expression child) {
Expand Down
Loading