Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/robpalme/bug/print-export-defau…
Browse files Browse the repository at this point in the history
…lt-iife'

# Conflicts:
#	lib/fast-path.js
#	test/printer.js
  • Loading branch information
GerHobbelt committed Jul 19, 2019
2 parents 5365793 + 24eb7ed commit e099d84
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/fast-path.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ FPp.needsParens = function(assumeExpressionContext) {
assert.strictEqual(parent.right, node);
return true;
}
// fall-through

default:
return false;
Expand Down Expand Up @@ -392,10 +393,10 @@ FPp.needsParens = function(assumeExpressionContext) {
}

case "ArrowFunctionExpression":
if(n.CallExpression.check(parent) && name === 'callee') {
if (n.CallExpression.check(parent) && name === 'callee') {
return true;
}
if(n.MemberExpression.check(parent) && name === 'object') {
if (n.MemberExpression.check(parent) && name === 'object') {
return true;
}

Expand All @@ -414,6 +415,7 @@ FPp.needsParens = function(assumeExpressionContext) {
n.FunctionExpression.check(node.callee)) {
return true;
}
break;
}

if (parent.type === "NewExpression" &&
Expand Down

0 comments on commit e099d84

Please sign in to comment.