use of com.google.javascript.jscomp.parsing.parser.trees.FunctionTypeTree in project closure-compiler by google.
the class Parser method parseFunctionTypeExpression.
private ParseTree parseFunctionTypeExpression() {
SourcePosition start = getTreeStartLocation();
ParseTree typeExpression = null;
if (peekFunctionTypeExpression()) {
FormalParameterListTree formalParameterList;
formalParameterList = parseFormalParameterList(ParamContext.IMPLEMENTATION);
eat(TokenType.ARROW);
ParseTree returnType = parseType();
typeExpression = new FunctionTypeTree(getTreeLocation(start), formalParameterList, returnType);
} else {
typeExpression = parseArrayTypeExpression();
}
return typeExpression;
}
Aggregations