diff options
Diffstat (limited to 'src/parse')
-rw-r--r-- | src/parse/lex.cpp | 4 | ||||
-rw-r--r-- | src/parse/token.cpp | 21 |
2 files changed, 23 insertions, 2 deletions
diff --git a/src/parse/lex.cpp b/src/parse/lex.cpp index 2b84d0e4..6097839d 100644 --- a/src/parse/lex.cpp +++ b/src/parse/lex.cpp @@ -20,8 +20,8 @@ #include <typeinfo> #include <algorithm> // std::count -const bool DEBUG_PRINT_TOKENS = false; -//const bool DEBUG_PRINT_TOKENS = true; +//const bool DEBUG_PRINT_TOKENS = false; +const bool DEBUG_PRINT_TOKENS = true; Lexer::Lexer(const ::std::string& filename): m_path(filename.c_str()), diff --git a/src/parse/token.cpp b/src/parse/token.cpp index 5b580fe3..6380992e 100644 --- a/src/parse/token.cpp +++ b/src/parse/token.cpp @@ -445,6 +445,27 @@ SERIALISE_TYPE(Token::, "Token", { if( tok.m_data.is_Integer() ) os << ":" << tok.intval(); break; + case TOK_INTERPOLATED_TYPE: + os << ":" << *reinterpret_cast<TypeRef*>(tok.m_data.as_Fragment()); + break; + case TOK_INTERPOLATED_PATTERN: + os << ":" << *reinterpret_cast<AST::Pattern*>(tok.m_data.as_Fragment()); + break; + case TOK_INTERPOLATED_PATH: + os << ":" << *reinterpret_cast<AST::Path*>(tok.m_data.as_Fragment()); + break; + case TOK_INTERPOLATED_EXPR: + os << ":" << *reinterpret_cast<AST::ExprNode*>(tok.m_data.as_Fragment()); + break; + case TOK_INTERPOLATED_STMT: + os << ":" << *reinterpret_cast<AST::ExprNode*>(tok.m_data.as_Fragment()); + break; + case TOK_INTERPOLATED_BLOCK: + os << ":" << *reinterpret_cast<AST::ExprNode*>(tok.m_data.as_Fragment()); + break; + case TOK_INTERPOLATED_META: + os << ":" << *reinterpret_cast<AST::MetaItem*>(tok.m_data.as_Fragment()); + break; default: break; } |