Search in sources :

Example 1 with ComprehensionIfTree

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

the class Parser method parseComprehensionIf.

private ParseTree parseComprehensionIf() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.IF);
    eat(TokenType.OPEN_PAREN);
    ParseTree initializer = parseAssignmentExpression();
    eat(TokenType.CLOSE_PAREN);
    return new ComprehensionIfTree(getTreeLocation(start), initializer);
}
Also used : ComprehensionIfTree(com.google.javascript.jscomp.parsing.parser.trees.ComprehensionIfTree) SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition) ParseTree(com.google.javascript.jscomp.parsing.parser.trees.ParseTree)

Aggregations

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