Remove PipelineTopicExpression and PipelinePrimaryTopicReference (#11531)

This commit is contained in:
Sosuke Suzuki authored and GitHub committed 2021-09-22 18:08:08 +09:00
1 parent 5aabd70950
commit 41d77d6c13
1 file changed
+1 -17
+1 -17
View File
@@ -218,10 +218,7 @@ function needsParens(path, options) {
}
case "BinaryExpression": {
if (
parent.type === "UpdateExpression" ||
(parent.type === "PipelineTopicExpression" && node.operator === "|>")
) {
if (parent.type === "UpdateExpression") {
return true;
}
@@ -367,16 +364,6 @@ function needsParens(path, options) {
) {
return true;
}
if (
name === "expression" &&
node.argument &&
node.argument.type === "PipelinePrimaryTopicReference" &&
parent.type === "PipelineTopicExpression"
) {
return true;
}
// else fallthrough
case "AwaitExpression":
switch (parent.type) {
@@ -646,9 +633,6 @@ function needsParens(path, options) {
case "ArrowFunctionExpression":
switch (parent.type) {
case "PipelineTopicExpression":
return Boolean(node.extra && node.extra.parenthesized);
case "BinaryExpression":
return (
parent.operator !== "|>" || (node.extra && node.extra.parenthesized)