Search in sources :

Example 21 with TypedExpression

use of org.drools.mvelcompiler.ast.TypedExpression in project drools by kiegroup.

the class StatementVisitor method visit.

@Override
public TypedExpression visit(DoStmt n, Void arg) {
    TypedExpression typedCondition = new RHSPhase(mvelCompilerContext).invoke(n.getCondition());
    TypedExpression typedThen = n.getBody().accept(this, arg);
    return new DoStmtT(typedCondition, typedThen);
}
Also used : DoStmtT(org.drools.mvelcompiler.ast.DoStmtT) UnalteredTypedExpression(org.drools.mvelcompiler.ast.UnalteredTypedExpression) TypedExpression(org.drools.mvelcompiler.ast.TypedExpression)

Aggregations

TypedExpression (org.drools.mvelcompiler.ast.TypedExpression)21 UnalteredTypedExpression (org.drools.mvelcompiler.ast.UnalteredTypedExpression)18 Expression (com.github.javaparser.ast.expr.Expression)8 Node (com.github.javaparser.ast.Node)4 Type (java.lang.reflect.Type)4 Optional (java.util.Optional)4 FieldToAccessorTExpr (org.drools.mvelcompiler.ast.FieldToAccessorTExpr)4 BlockStmt (com.github.javaparser.ast.stmt.BlockStmt)3 ExpressionStmt (com.github.javaparser.ast.stmt.ExpressionStmt)3 Method (java.lang.reflect.Method)3 List (java.util.List)3 Optional.ofNullable (java.util.Optional.ofNullable)3 DrlGenericVisitor (org.drools.mvel.parser.ast.visitor.DrlGenericVisitor)3 DoStmtT (org.drools.mvelcompiler.ast.DoStmtT)3 ForEachStmtT (org.drools.mvelcompiler.ast.ForEachStmtT)3 MapPutExprT (org.drools.mvelcompiler.ast.MapPutExprT)3 WhileStmtT (org.drools.mvelcompiler.ast.WhileStmtT)3 BinaryExpr (com.github.javaparser.ast.expr.BinaryExpr)2 DoStmt (com.github.javaparser.ast.stmt.DoStmt)2 ForEachStmt (com.github.javaparser.ast.stmt.ForEachStmt)2