diff options
Diffstat (limited to 'src/compile.cpp')
-rw-r--r-- | src/compile.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/compile.cpp b/src/compile.cpp index 14cd562..88accf4 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -34,7 +34,7 @@ compile_symbol(CEnv& cenv, const ASymbol* sym) throw() } static CVal -compile_fn(CEnv& cenv, const ACall* fn) throw() +compile_fn(CEnv& cenv, const ATuple* fn) throw() { const AType* type = cenv.type(fn); CFunc f = cenv.findImpl(fn, type); @@ -82,7 +82,7 @@ compile_type(CEnv& cenv, const AType* type) throw() } static CVal -compile_call(CEnv& cenv, const ACall* call) throw() +compile_call(CEnv& cenv, const ATuple* call) throw() { CFunc f = resp_compile(cenv, *call->begin()); @@ -90,14 +90,14 @@ compile_call(CEnv& cenv, const ACall* call) throw() f = cenv.currentFn; // Recursive call (callee defined as a stub) vector<CVal> args; - for (ACall::const_iterator e = call->iter_at(1); e != call->end(); ++e) + for (ATuple::const_iterator e = call->iter_at(1); e != call->end(); ++e) args.push_back(resp_compile(cenv, *e)); return cenv.engine()->compileCall(cenv, f, cenv.type(call->head()), args); } static CVal -compile_def(CEnv& cenv, const ACall* def) throw() +compile_def(CEnv& cenv, const ATuple* def) throw() { const ASymbol* const sym = def->list_ref(1)->as<const ASymbol*>(); const AST* const body = def->list_ref(2); @@ -113,7 +113,7 @@ compile_def(CEnv& cenv, const ACall* def) throw() } static CVal -compile_cons(CEnv& cenv, const ACall* cons) throw() +compile_cons(CEnv& cenv, const ATuple* cons) throw() { AType* type = new AType(const_cast<ASymbol*>(cons->head()->as<const ASymbol*>()), NULL, Cursor()); TList tlist(type); @@ -126,7 +126,7 @@ compile_cons(CEnv& cenv, const ACall* cons) throw() } static CVal -compile_dot(CEnv& cenv, const ACall* dot) throw() +compile_dot(CEnv& cenv, const ATuple* dot) throw() { ATuple::const_iterator i = dot->begin(); const AST* tup = *++i; @@ -159,12 +159,12 @@ resp_compile(CEnv& cenv, const AST* ast) throw() if (type) return compile_type(cenv, type); - const ACall* const call = ast->to<const ACall*>(); + const ATuple* const call = ast->to<const ATuple*>(); if (call) { const ASymbol* const sym = call->head()->to<const ASymbol*>(); const std::string form = sym ? sym->cppstr : ""; if (is_primitive(cenv.penv, call)) - return cenv.engine()->compilePrimitive(cenv, ast->as<const ACall*>()); + return cenv.engine()->compilePrimitive(cenv, ast->as<const ATuple*>()); else if (form == "fn") return compile_fn(cenv, call); else if (form == "def") |