use of org.elasticsearch.painless.node.SSource.MainMethodReserved in project elasticsearch by elastic.
the class Walker method visitSource.
@Override
public ANode visitSource(SourceContext ctx) {
reserved.push(new MainMethodReserved());
List<SFunction> functions = new ArrayList<>();
for (FunctionContext function : ctx.function()) {
functions.add((SFunction) visit(function));
}
List<AStatement> statements = new ArrayList<>();
for (StatementContext statement : ctx.statement()) {
statements.add((AStatement) visit(statement));
}
return new SSource(scriptInterface, settings, sourceName, sourceText, debugStream, (MainMethodReserved) reserved.pop(), location(ctx), functions, globals, statements);
}
Aggregations