Search in sources :

Example 1 with EnumDeclarationTree

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

the class Parser method parseEnumDeclaration.

private ParseTree parseEnumDeclaration() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.ENUM);
    IdentifierToken name = eatId();
    eat(TokenType.OPEN_CURLY);
    ImmutableList<ParseTree> members = parseEnumMembers();
    eat(TokenType.CLOSE_CURLY);
    return new EnumDeclarationTree(getTreeLocation(start), name, members);
}
Also used : SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition) EnumDeclarationTree(com.google.javascript.jscomp.parsing.parser.trees.EnumDeclarationTree) ParseTree(com.google.javascript.jscomp.parsing.parser.trees.ParseTree)

Aggregations

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