summaryrefslogtreecommitdiff
path: root/src/ast/ast.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2015-09-19 18:55:13 +0800
committerJohn Hodge <tpg@mutabah.net>2015-09-19 18:55:13 +0800
commit8b22df5f2a6e1f37cf1964f82d369c8363e8016b (patch)
treec4ed3c14fe3890cc4e04a6a1a975f575b2c0b714 /src/ast/ast.cpp
parente6738ed57d644572e7cbefa6d68a4118935a5f80 (diff)
downloadmrust-8b22df5f2a6e1f37cf1964f82d369c8363e8016b.tar.gz
Remove function class in favor of full UFCS
Diffstat (limited to 'src/ast/ast.cpp')
-rw-r--r--src/ast/ast.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/ast/ast.cpp b/src/ast/ast.cpp
index d2006e52..2fe36225 100644
--- a/src/ast/ast.cpp
+++ b/src/ast/ast.cpp
@@ -798,38 +798,12 @@ SERIALISE_TYPE(Static::, "AST_Static", {
s.item(m_value);
})
-::Serialiser& operator<<(::Serialiser& s, Function::Class fc)
-{
- switch(fc)
- {
- case Function::CLASS_UNBOUND: s << "UNBOUND"; break;
- case Function::CLASS_REFMETHOD: s << "REFMETHOD"; break;
- case Function::CLASS_MUTMETHOD: s << "MUTMETHOD"; break;
- case Function::CLASS_VALMETHOD: s << "VALMETHOD"; break;
- case Function::CLASS_MUTVALMETHOD: s << "MUTVALMETHOD"; break;
- }
- return s;
-}
-void operator>>(::Deserialiser& s, Function::Class& fc)
-{
- ::std::string n;
- s.item(n);
- if(n == "UNBOUND") fc = Function::CLASS_UNBOUND;
- else if(n == "REFMETHOD") fc = Function::CLASS_REFMETHOD;
- else if(n == "MUTMETHOD") fc = Function::CLASS_MUTMETHOD;
- else if(n == "VALMETHOD") fc = Function::CLASS_VALMETHOD;
- else if(n == "MUTVALMETHOD") fc = Function::CLASS_MUTVALMETHOD;
- else
- throw ::std::runtime_error("Deserialise Function::Class");
-}
SERIALISE_TYPE(Function::, "AST_Function", {
- s << m_fcn_class;
s << m_params;
s << m_rettype;
s << m_args;
s << m_code;
},{
- s >> m_fcn_class;
s.item(m_params);
s.item(m_rettype);
s.item(m_args);