Search in sources :

Example 1 with ArrayTypeTree

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

the class Parser method parseArrayTypeExpression.

private ParseTree parseArrayTypeExpression() {
    SourcePosition start = getTreeStartLocation();
    ParseTree typeExpression = parseParenTypeExpression();
    while (!peekImplicitSemiColon() && peek(TokenType.OPEN_SQUARE)) {
        eat(TokenType.OPEN_SQUARE);
        eat(TokenType.CLOSE_SQUARE);
        typeExpression = new ArrayTypeTree(getTreeLocation(start), typeExpression);
    }
    return typeExpression;
}
Also used : SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition) ParseTree(com.google.javascript.jscomp.parsing.parser.trees.ParseTree) ArrayTypeTree(com.google.javascript.jscomp.parsing.parser.trees.ArrayTypeTree)

Aggregations

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