diff options
Diffstat (limited to 'yql/essentials/sql/v1/format/sql_format.cpp')
| -rw-r--r-- | yql/essentials/sql/v1/format/sql_format.cpp | 10 |
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; |
