| 1 | #include "iostream_debug_helpers.h" |
|---|---|
| 2 | #include <Parsers/IAST.h> |
| 3 | #include <Parsers/IParser.h> |
| 4 | #include <Parsers/Lexer.h> |
| 5 | #include <Parsers/TokenIterator.h> |
| 6 | |
| 7 | namespace DB |
| 8 | { |
| 9 | |
| 10 | std::ostream & operator<<(std::ostream & stream, const Token & what) |
| 11 | { |
| 12 | stream << "Token (type="<< static_cast<int>(what.type) << "){"<< std::string{what.begin, what.end} << "}"; |
| 13 | return stream; |
| 14 | } |
| 15 | |
| 16 | std::ostream & operator<<(std::ostream & stream, const Expected & what) |
| 17 | { |
| 18 | stream << "Expected {variants="; |
| 19 | dumpValue(stream, what.variants) |
| 20 | << "; max_parsed_pos="<< what.max_parsed_pos << "}"; |
| 21 | return stream; |
| 22 | } |
| 23 | |
| 24 | std::ostream & operator<<(std::ostream & stream, const IAST & what) |
| 25 | { |
| 26 | stream << "IAST{"; |
| 27 | what.dumpTree(stream); |
| 28 | stream << "}"; |
| 29 | return stream; |
| 30 | } |
| 31 | |
| 32 | } |
| 33 |