Fix explain formatting.

This commit is contained in:
Nikolai Kochetov 2020-06-23 17:20:57 +03:00
parent b282a1775f
commit 4ed499c6f0

View File

@ -52,8 +52,14 @@ public:
protected: protected:
void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override void formatQueryImpl(const FormatSettings & settings, FormatState & state, FormatStateStacked frame) const override
{ {
settings.ostr << (settings.hilite ? hilite_keyword : "") << toString(kind, old_syntax) << (settings.hilite ? hilite_none : "") << " "; settings.ostr << (settings.hilite ? hilite_keyword : "") << toString(kind, old_syntax) << (settings.hilite ? hilite_none : "");
ast_settings->formatImpl(settings, state, frame);
if (ast_settings)
{
settings.ostr << ' ';
ast_settings->formatImpl(settings, state, frame);
}
settings.ostr << settings.nl_or_ws; settings.ostr << settings.nl_or_ws;
query->formatImpl(settings, state, frame); query->formatImpl(settings, state, frame);
} }