ClickHouse/dbms/Parsers/formatAST.cpp
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

24 lines
405 B
C++

#include <Parsers/formatAST.h>
#include <sstream>
namespace DB
{
void formatAST(const IAST & ast, std::ostream & s, bool hilite, bool one_line)
{
IAST::FormatSettings settings(s, one_line);
settings.hilite = hilite;
ast.format(settings);
}
String serializeAST(const IAST & ast, bool one_line)
{
std::stringstream ss;
formatAST(ast, ss, false, one_line);
return ss.str();
}
}