From 4ca3cd8d1aec6f550ab14e4ef2865ae11465da8e Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Wed, 22 Jun 2016 13:18:43 +0100 Subject: [PATCH] remove line terminator restriction after await keyword - fixes #38 --- src/parser/expression.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/parser/expression.js b/src/parser/expression.js index e6b3c4252a..3bb8d1aecb 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -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."); }