Wrap some generated do expressions in parens (#5339)
This commit is contained in:
committed by
Henry Zhu
parent
be293bd708
commit
6614a63b3b
@@ -46,6 +46,10 @@ export function ObjectExpression(node: Object, parent: Object, printStack: Array
|
||||
return isFirstInStatement(printStack, { considerArrow: true });
|
||||
}
|
||||
|
||||
export function DoExpression(node: Object, parent: Object, printStack: Array<Object>): boolean {
|
||||
return isFirstInStatement(printStack);
|
||||
}
|
||||
|
||||
export function Binary(node: Object, parent: Object): boolean {
|
||||
if ((t.isCallExpression(parent) || t.isNewExpression(parent)) && parent.callee === node) {
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user