use of org.elasticsearch.painless.antlr.PainlessParser.MaptokenContext in project elasticsearch by elastic.
the class Walker method visitMapinitializer.
@Override
public ANode visitMapinitializer(MapinitializerContext ctx) {
List<AExpression> keys = new ArrayList<>();
List<AExpression> values = new ArrayList<>();
for (MaptokenContext maptoken : ctx.maptoken()) {
keys.add((AExpression) visit(maptoken.expression(0)));
values.add((AExpression) visit(maptoken.expression(1)));
}
return new EMapInit(location(ctx), keys, values);
}
Aggregations