Search in sources :

Example 1 with EConditional

use of org.elasticsearch.painless.node.EConditional in project elasticsearch by elastic.

the class Walker method visitConditional.

@Override
public ANode visitConditional(ConditionalContext ctx) {
    AExpression condition = (AExpression) visit(ctx.expression(0));
    AExpression left = (AExpression) visit(ctx.expression(1));
    AExpression right = (AExpression) visit(ctx.expression(2));
    return new EConditional(location(ctx), condition, left, right);
}
Also used : AExpression(org.elasticsearch.painless.node.AExpression) EConditional(org.elasticsearch.painless.node.EConditional)

Aggregations

AExpression (org.elasticsearch.painless.node.AExpression)1 EConditional (org.elasticsearch.painless.node.EConditional)1