diff options
author | David Robillard <d@drobilla.net> | 2010-12-03 03:08:08 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-03 03:08:08 +0000 |
commit | ad056bdf71c8bf780e22f983c83fac0e3a2f41f3 (patch) | |
tree | 0d70ea6eb4188f40034e8e011adc5be6e0956fc7 /src/resp.cpp | |
parent | 074edbce57e850fc3293eef47861e0ed7707c7e9 (diff) | |
download | resp-ad056bdf71c8bf780e22f983c83fac0e3a2f41f3.tar.gz resp-ad056bdf71c8bf780e22f983c83fac0e3a2f41f3.tar.bz2 resp-ad056bdf71c8bf780e22f983c83fac0e3a2f41f3.zip |
Remove use of RTTI for AST.
git-svn-id: http://svn.drobilla.net/resp/resp@290 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/resp.cpp')
-rw-r--r-- | src/resp.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/resp.cpp b/src/resp.cpp index 611de0d..eb70e62 100644 --- a/src/resp.cpp +++ b/src/resp.cpp @@ -31,11 +31,11 @@ GC Object::pool(8 * 1024 * 1024); bool is_form(const AST* ast, const std::string& form) { - const ATuple* call = ast->to<const ATuple*>(); + const ATuple* call = ast->to_tuple(); if (!call) return false; - const ASymbol* const sym = call->head()->to<const ASymbol*>(); + const ASymbol* const sym = call->head()->to_symbol(); if (!sym) return false; @@ -45,11 +45,11 @@ is_form(const AST* ast, const std::string& form) bool is_primitive(const PEnv& penv, const AST* ast) { - const ATuple* call = ast->to<const ATuple*>(); + const ATuple* call = ast->to_tuple(); if (!call) return false; - const ASymbol* const sym = call->head()->to<const ASymbol*>(); + const ASymbol* const sym = call->head()->to_symbol(); if (!sym) return false; @@ -144,7 +144,7 @@ main(int argc, char** argv) while (is.good() && !is.eof()) { Cursor loc(*f); AST* exp = readExpression(loc, is); - if (!exp || (exp->as<ATuple*>() && exp->as<ATuple*>()->tup_len() == 1)) + if (!exp || (exp->as_tuple() && exp->as_tuple()->tup_len() == 1)) break; AST* ast = penv.parse(exp); |