summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/format/sql_format.cpp
diff options
context:
space:
mode:
authorvvvv <[email protected]>2025-02-04 19:21:40 +0300
committervvvv <[email protected]>2025-02-04 21:32:52 +0300
commit8de4bd702eb90b0a0908781e3620c257484149bd (patch)
treecd60b09ece963e062fa04bcb8432c72a48d15fe4 /yql/essentials/sql/v1/format/sql_format.cpp
parent3baeef8f8741d96e951eaf9b62176fb8e9589041 (diff)
YQL-19545 fixed indents for ??
commit_hash:ab832f6789d55200e094cc4fdfd75499e58d62c1
Diffstat (limited to 'yql/essentials/sql/v1/format/sql_format.cpp')
-rw-r--r--yql/essentials/sql/v1/format/sql_format.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/yql/essentials/sql/v1/format/sql_format.cpp b/yql/essentials/sql/v1/format/sql_format.cpp
index 19619bf6e89..1240e073537 100644
--- a/yql/essentials/sql/v1/format/sql_format.cpp
+++ b/yql/essentials/sql/v1/format/sql_format.cpp
@@ -2671,10 +2671,11 @@ private:
}
void VisitNeqSubexpr(const TRule_neq_subexpr& msg) {
- VisitNeqSubexprImpl(msg, false);
+ bool pushedIndent = false;
+ VisitNeqSubexprImpl(msg, pushedIndent, true);
}
- void VisitNeqSubexprImpl(const TRule_neq_subexpr& msg, bool pushedIndent) {
+ void VisitNeqSubexprImpl(const TRule_neq_subexpr& msg, bool& pushedIndent, bool top) {
auto getExpr = [](const TRule_neq_subexpr::TBlock2& b) -> const TRule_bit_subexpr& { return b.GetRule_bit_subexpr2(); };
auto getOp = [](const TRule_neq_subexpr::TBlock2& b) -> const TRule_neq_subexpr::TBlock2::TBlock1& { return b.GetBlock1(); };
VisitBinaryOp(msg.GetRule_bit_subexpr1(), getOp, getExpr, msg.GetBlock2().begin(), msg.GetBlock2().end());
@@ -2706,9 +2707,10 @@ private:
}
}
- VisitNeqSubexprImpl(alt.GetRule_neq_subexpr2(), pushedIndent);
- if (pushedIndent) {
+ VisitNeqSubexprImpl(alt.GetRule_neq_subexpr2(), pushedIndent, false);
+ if (pushedIndent && top) {
PopCurrentIndent();
+ pushedIndent = false;
}
break;