@Override
  public void visitAttributeExpression(AttributeExpression expr) {
    AttributeExpression conversion =
        new AttributeExpression(
            expr.isImplicitThis() ?
                expr.getObjectExpression() :
                convert(expr.getObjectExpression()),
            expr.getProperty(),
            expr.isSafe());

    conversion.setSourcePosition(expr);
    conversion.setSpreadSafe(expr.isSpreadSafe());
    conversion.setStatic(expr.isStatic());
    conversion.setImplicitThis(expr.isImplicitThis());
    result = record(conversion);
  }
Rewrites explicit ("assert x > 3") and implicit ("x > 3") condition
statements. Replacing the original statement with the rewritten one is up
to clients.

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