public Expression transformRangeExpression(RangeExpression range) { final ClassNode inferred = range.getNodeMetaData(StaticTypesMarker.INFERRED_TYPE); if (INTRANGE_TYPE.equals(inferred)) { ArgumentListExpression bounds = new ArgumentListExpression( new ConstantExpression(range.isInclusive(), true), range.getFrom(), range.getTo()); ConstructorCallExpression cce = new ConstructorCallExpression(INTRANGE_TYPE, bounds); cce.setSourcePosition(range); cce.putNodeMetaData(StaticTypesMarker.DIRECT_METHOD_CALL_TARGET, INTRANGE_CTOR); cce.putNodeMetaData(StaticTypesMarker.INFERRED_TYPE, INTRANGE_TYPE); return transformer.transform(cce); } return transformer.superTransform(range); }
public void visitRangeExpression(RangeExpression expression) { expression.getFrom().visit(this); expression.getTo().visit(this); }