Search in sources :

Example 1 with TypeAliasTree

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

the class Parser method parseTypeAlias.

private ParseTree parseTypeAlias() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.TYPE);
    IdentifierToken alias = eatId();
    eat(TokenType.EQUAL);
    ParseTree original = parseType();
    eatPossibleImplicitSemiColon();
    return new TypeAliasTree(getTreeLocation(start), alias, original);
}
Also used : SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition) TypeAliasTree(com.google.javascript.jscomp.parsing.parser.trees.TypeAliasTree) ParseTree(com.google.javascript.jscomp.parsing.parser.trees.ParseTree)

Aggregations

ParseTree (com.google.javascript.jscomp.parsing.parser.trees.ParseTree)1 TypeAliasTree (com.google.javascript.jscomp.parsing.parser.trees.TypeAliasTree)1 SourcePosition (com.google.javascript.jscomp.parsing.parser.util.SourcePosition)1