use of com.google.javascript.jscomp.parsing.parser.trees.ThrowStatementTree in project closure-compiler by google.
the class Parser method parseThrowStatement.
// 12.13 Throw Statement
private ParseTree parseThrowStatement() {
SourcePosition start = getTreeStartLocation();
eat(TokenType.THROW);
ParseTree value = null;
if (peekImplicitSemiColon()) {
reportError("semicolon/newline not allowed after 'throw'");
} else {
value = parseExpression();
}
eatPossiblyImplicitSemiColon();
return new ThrowStatementTree(getTreeLocation(start), value);
}
Aggregations