remove line terminator restriction after await keyword - fixes #38
This commit is contained in:
parent
43e01e40f1
commit
4ca3cd8d1a
@ -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.");
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user