use of com.google.javascript.jscomp.parsing.parser.trees.ParameterizedTypeTree in project closure-compiler by google.
the class Parser method parseTypeArgumentList.
private ParseTree parseTypeArgumentList(SourcePosition start, TypeNameTree typeName) {
// < TypeArgumentList >
// TypeArgumentList , TypeArgument
eat(TokenType.OPEN_ANGLE);
scanner.incTypeParameterLevel();
ImmutableList.Builder<ParseTree> typeArguments = ImmutableList.builder();
ParseTree type = parseType();
typeArguments.add(type);
while (peek(TokenType.COMMA)) {
eat(TokenType.COMMA);
type = parseType();
if (type != null) {
typeArguments.add(type);
}
}
eat(TokenType.CLOSE_ANGLE);
scanner.decTypeParameterLevel();
return new ParameterizedTypeTree(getTreeLocation(start), typeName, typeArguments.build());
}
Aggregations