From bf841c7e2798a71ecd772d70b4648a5b2be325fc Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Tue, 15 Sep 2015 06:19:26 +0100 Subject: [PATCH] use extra.parenthesized rather than parenthesizedExpression --- src/parser/expression.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/parser/expression.js b/src/parser/expression.js index e819ed1b71..786b094a25 100644 --- a/src/parser/expression.js +++ b/src/parser/expression.js @@ -109,7 +109,7 @@ pp.parseMaybeAssign = function (noIn, refShorthandDefaultPos, afterLeftParse) { node.left = this.match(tt.eq) ? this.toAssignable(left) : left; refShorthandDefaultPos.start = 0; // reset because shorthand default was used correctly this.checkLVal(left); - if (left.parenthesizedExpression) { + if (left.extra && left.extra.parenthesized) { let errorMsg; if (left.type === "ObjectPattern") { errorMsg = "`({a}) = 0` use `({a} = 0)`"; @@ -540,8 +540,7 @@ pp.parseParenAndDistinguishExpression = function (startPos, startLoc, canBeArrow } else { val = exprList[0]; } - - val.parenthesizedExpression = true; + this.addExtra(val, "parenthesized", true); return val; };