remove line terminator restriction after await keyword - fixes #38

This commit is contained in:
Sebastian McKenzie 2016-06-22 13:18:43 +01:00
parent 43e01e40f1
commit 4ca3cd8d1a

View File

@ -146,7 +146,7 @@ pp.parseMaybeConditional = function (noIn, refShorthandDefaultPos, refNeedsArrow
let startPos = this.state.start, startLoc = this.state.startLoc;
let expr = this.parseExprOps(noIn, refShorthandDefaultPos);
if (refShorthandDefaultPos && refShorthandDefaultPos.start) return expr;
return this.parseConditional(expr, noIn, startPos, startLoc, refNeedsArrowPos);
};
@ -982,9 +982,6 @@ pp.parseAwait = function (node) {
if (!this.state.inAsync) {
this.unexpected();
}
if (this.isLineTerminator()) {
this.unexpected();
}
if (this.match(tt.star)) {
this.raise(node.start, "await* has been removed from the async functions proposal. Use Promise.all() instead.");
}