use of org.elasticsearch.painless.antlr.PainlessParser.ExpressionContext in project elasticsearch by elastic.
the class Walker method visitNewstandardarray.
@Override
public ANode visitNewstandardarray(NewstandardarrayContext ctx) {
String type = ctx.TYPE().getText();
List<AExpression> expressions = new ArrayList<>();
for (ExpressionContext expression : ctx.expression()) {
expressions.add((AExpression) visit(expression));
}
return buildPostfixChain(new ENewArray(location(ctx), type, expressions, false), ctx.postdot(), ctx.postfix());
}
use of org.elasticsearch.painless.antlr.PainlessParser.ExpressionContext in project elasticsearch by elastic.
the class Walker method visitNewinitializedarray.
@Override
public ANode visitNewinitializedarray(NewinitializedarrayContext ctx) {
String type = ctx.TYPE().getText();
List<AExpression> expressions = new ArrayList<>();
for (ExpressionContext expression : ctx.expression()) {
expressions.add((AExpression) visit(expression));
}
return buildPostfixChain(new ENewArray(location(ctx), type, expressions, true), null, ctx.postfix());
}
Aggregations