use of com.google.javascript.jscomp.parsing.parser.trees.AwaitExpressionTree in project closure-compiler by google.
the class Parser method parseAwaitExpression.
private ParseTree parseAwaitExpression() {
SourcePosition start = getTreeStartLocation();
if (functionContextStack.isEmpty() || !functionContextStack.peekLast().isAsynchronous) {
reportError("'await' used in a non-async function context");
}
eatPredefinedString(AWAIT);
ParseTree expression = parseUnaryExpression();
return new AwaitExpressionTree(getTreeLocation(start), expression);
}
Aggregations