Search in sources :

Example 1 with WithStatementTree

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

the class Parser method parseWithStatement.

// 12.10 The with Statement
private ParseTree parseWithStatement() {
    SourcePosition start = getTreeStartLocation();
    eat(TokenType.WITH);
    eat(TokenType.OPEN_PAREN);
    ParseTree expression = parseExpression();
    eat(TokenType.CLOSE_PAREN);
    ParseTree body = parseStatement();
    return new WithStatementTree(getTreeLocation(start), expression, body);
}
Also used : WithStatementTree(com.google.javascript.jscomp.parsing.parser.trees.WithStatementTree) SourcePosition(com.google.javascript.jscomp.parsing.parser.util.SourcePosition) ParseTree(com.google.javascript.jscomp.parsing.parser.trees.ParseTree)

Aggregations

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