use of org.drools.mvelcompiler.ast.ForStmtT in project drools by kiegroup.
the class StatementVisitor method visit.
@Override
public TypedExpression visit(ForStmt n, Void arg) {
List<TypedExpression> typedInitialization = n.getInitialization().stream().map(this::compileMVEL).collect(Collectors.toList());
Optional<TypedExpression> typedCompare = n.getCompare().map(c -> new RHSPhase(mvelCompilerContext).invoke(c));
List<TypedExpression> typedUpdate = n.getUpdate().stream().map(this::compileMVEL).collect(Collectors.toList());
TypedExpression body = n.getBody().accept(this, arg);
return new ForStmtT(typedInitialization, typedCompare, typedUpdate, body);
}
Aggregations