@Override
  public void visitRangeExpression(RangeExpression expr) {
    RangeExpression conversion;
    if (RANGE_EXPRESSION_CONSTRUCTOR_GROOVY_4 != null) {
      conversion = ReflectionUtil.newInstance(RANGE_EXPRESSION_CONSTRUCTOR_GROOVY_4,
        convert(expr.getFrom()),
        convert(expr.getTo()),
        ReflectionUtil.invokeMethod(expr, RANGE_EXPRESSION_IS_EXCLUSIVE_LEFT),
        ReflectionUtil.invokeMethod(expr, RANGE_EXPRESSION_IS_EXCLUSIVE_RIGHT)
      );
    } else {
      conversion = new RangeExpression(
          convert(expr.getFrom()),
          convert(expr.getTo()),
          expr.isInclusive());
    }

    conversion.setSourcePosition(expr);
    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