@Override
  public void visitBinaryExpression(BinaryExpression expr) {
    expr.setLeftExpression(replaceExpr(expr.getLeftExpression()));
    expr.setRightExpression(replaceExpr(expr.getRightExpression()));
  }
Groovy AST visitor that allows to replace both statements and expressions.

@author Peter Niederwieser
spock-core/src/main/java/org/spockframework/compiler/ExpressionReplacingVisitorSupport.java