diff options
Diffstat (limited to 'src/parse')
-rw-r--r-- | src/parse/lex.cpp | 4 | ||||
-rw-r--r-- | src/parse/token.cpp | 8 | ||||
-rw-r--r-- | src/parse/tokentree.hpp | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/parse/lex.cpp b/src/parse/lex.cpp index ee453579..f9d81f08 100644 --- a/src/parse/lex.cpp +++ b/src/parse/lex.cpp @@ -1161,10 +1161,6 @@ TokenTree TokenTree::clone() const return TokenTree( mv$(ents) ); } } -SERIALISE_TYPE_A(TokenTree::, "TokenTree", { - s.item(m_tok); - s.item(m_subtrees); -}) bool Codepoint::isspace() const { switch(this->v) diff --git a/src/parse/token.cpp b/src/parse/token.cpp index 6380992e..3f95d9fd 100644 --- a/src/parse/token.cpp +++ b/src/parse/token.cpp @@ -372,6 +372,14 @@ void operator%(::Deserialiser& s, enum eTokenType& c) { s.item(n); c = Token::typefromstr(n); } +void operator%(::Serialiser& s, enum eCoreType t) { + s << coretype_name(t); +} +void operator%(::Deserialiser& s, enum eCoreType& t) { + ::std::string n; + s.item(n); + t = coretype_fromstring(n); +} SERIALISE_TYPE(Token::, "Token", { s % m_type; s << Token::Data::tag_to_str(m_data.tag()); diff --git a/src/parse/tokentree.hpp b/src/parse/tokentree.hpp index 7f8810a7..833b39dc 100644 --- a/src/parse/tokentree.hpp +++ b/src/parse/tokentree.hpp @@ -2,10 +2,8 @@ #define TOKENTREE_HPP_INCLUDED
#include "lex.hpp"
-#include "../include/serialise.hpp"
-class TokenTree:
- public Serialisable
+class TokenTree
{
Token m_tok;
::std::vector<TokenTree> m_subtrees;
@@ -54,8 +52,6 @@ public: return os;
}
}
-
- SERIALISABLE_PROTOTYPES();
};
class TTStream:
|