use of org.apache.groovy.parser.antlr4.GroovyParser.VariableDeclaratorsContext in project groovy by apache.
the class AstBuilder method visitVariableDeclarators.
@Override
public List<DeclarationExpression> visitVariableDeclarators(final VariableDeclaratorsContext ctx) {
ClassNode variableType = ctx.getNodeMetaData(VARIABLE_DECLARATION_VARIABLE_TYPE);
Objects.requireNonNull(variableType, "variableType should not be null");
return ctx.variableDeclarator().stream().map(e -> {
e.putNodeMetaData(VARIABLE_DECLARATION_VARIABLE_TYPE, variableType);
return this.visitVariableDeclarator(e);
}).collect(Collectors.toList());
}
Aggregations