use of org.elasticsearch.painless.node.EMapInit 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