From 996f5e423cff1698cfba2ad11c261bde909a2f36 Mon Sep 17 00:00:00 2001 From: Gabe Johnson Date: Fri, 1 Jul 2016 15:03:36 -0500 Subject: [PATCH] Remove TemplateExpressions from LHSE check. --- src/enforester.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/enforester.js b/src/enforester.js index 77a32fb3..9dbf8f4e 100644 --- a/src/enforester.js +++ b/src/enforester.js @@ -1129,13 +1129,16 @@ export class Enforester { // $x:expr [ $b:expr ] this.isBrackets(lookahead) || // $x:expr (...) - this.isParens(lookahead) || - // $x:id `...` - this.isTemplate(lookahead) + this.isParens(lookahead) ))) { return this.enforestLeftHandSideExpression({ allowCall: true }); } + // $x:id `...` + if(this.term && this.isTemplate(lookahead)) { + return this.enforestTemplateLiteral(); + } + // postfix unary if (this.term && this.isUpdateOperator(lookahead)) { return this.enforestUpdateExpression();