2018-04-13 19:35:08 +00:00
|
|
|
#include "iostream_debug_helpers.h"
|
2019-10-28 05:42:51 +00:00
|
|
|
#include <Parsers/IAST.h>
|
2018-04-13 19:35:08 +00:00
|
|
|
#include <Parsers/IParser.h>
|
|
|
|
#include <Parsers/Lexer.h>
|
|
|
|
#include <Parsers/TokenIterator.h>
|
|
|
|
|
|
|
|
namespace DB
|
|
|
|
{
|
|
|
|
|
2018-05-07 02:01:11 +00:00
|
|
|
std::ostream & operator<<(std::ostream & stream, const Token & what)
|
|
|
|
{
|
2018-04-13 19:35:08 +00:00
|
|
|
stream << "Token (type="<< static_cast<int>(what.type) <<"){"<< std::string{what.begin, what.end} << "}";
|
|
|
|
return stream;
|
|
|
|
}
|
|
|
|
|
2018-05-07 02:01:11 +00:00
|
|
|
std::ostream & operator<<(std::ostream & stream, const Expected & what)
|
|
|
|
{
|
2018-04-13 19:35:08 +00:00
|
|
|
stream << "Expected {variants=";
|
|
|
|
dumpValue(stream, what.variants)
|
|
|
|
<< "; max_parsed_pos=" << what.max_parsed_pos << "}";
|
|
|
|
return stream;
|
|
|
|
}
|
|
|
|
|
2019-10-28 05:42:51 +00:00
|
|
|
std::ostream & operator<<(std::ostream & stream, const IAST & what)
|
|
|
|
{
|
|
|
|
stream << "IAST{";
|
|
|
|
what.dumpTree(stream);
|
|
|
|
stream << "}";
|
|
|
|
return stream;
|
|
|
|
}
|
|
|
|
|
2018-04-13 19:35:08 +00:00
|
|
|
}
|