Search in sources :

Example 1 with CallSignatureTree

use of com.google.javascript.jscomp.parsing.parser.trees.CallSignatureTree in project closure-compiler by google.

the class Parser method parseCallSignature.

private CallSignatureTree parseCallSignature(boolean isNew) {
    SourcePosition start = getTreeStartLocation();
    if (isNew) {
        eat(TokenType.NEW);
    }
    GenericTypeListTree generics = maybeParseGenericTypes();
    FormalParameterListTree params = parseFormalParameterList(ParamContext.SIGNATURE);
    ParseTree returnType = maybeParseColonType();
    return new CallSignatureTree(getTreeLocation(start), isNew, generics, params, returnType);
}
Also used : SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition) GenericTypeListTree(com.google.javascript.jscomp.parsing.parser.trees.GenericTypeListTree) CallSignatureTree(com.google.javascript.jscomp.parsing.parser.trees.CallSignatureTree) FormalParameterListTree(com.google.javascript.jscomp.parsing.parser.trees.FormalParameterListTree) ParseTree(com.google.javascript.jscomp.parsing.parser.trees.ParseTree)

Aggregations

CallSignatureTree (com.google.javascript.jscomp.parsing.parser.trees.CallSignatureTree)1 FormalParameterListTree (com.google.javascript.jscomp.parsing.parser.trees.FormalParameterListTree)1 GenericTypeListTree (com.google.javascript.jscomp.parsing.parser.trees.GenericTypeListTree)1 ParseTree (com.google.javascript.jscomp.parsing.parser.trees.ParseTree)1 SourcePosition (com.google.javascript.jscomp.parsing.parser.util.SourcePosition)1