diff options
author | David Robillard <d@drobilla.net> | 2010-12-28 07:40:30 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-12-28 07:40:30 +0000 |
commit | f0bbe766b9cfd14f09e847519b84cf7025839486 (patch) | |
tree | f12848bdb6335bbe43abd765d3ddd472ea01b2ca /src/compile.cpp | |
parent | 25e58056dc218afe0768081ef1c52974593773c0 (diff) | |
download | resp-f0bbe766b9cfd14f09e847519b84cf7025839486.tar.gz resp-f0bbe766b9cfd14f09e847519b84cf7025839486.tar.bz2 resp-f0bbe766b9cfd14f09e847519b84cf7025839486.zip |
Use fst ("first") instead of head and rst ("rest") instead of tail.
git-svn-id: http://svn.drobilla.net/resp/resp@366 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/compile.cpp')
-rw-r--r-- | src/compile.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/compile.cpp b/src/compile.cpp index 756e90d..1de8a78 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -53,13 +53,13 @@ compile_literal_symbol(CEnv& cenv, const ASymbol* sym) throw() static CVal compile_type(CEnv& cenv, const AST* type) throw() { - return compile_literal_symbol(cenv, type->as_tuple()->head()->as_symbol()); + return compile_literal_symbol(cenv, type->as_tuple()->fst()->as_symbol()); } static CVal compile_cons(CEnv& cenv, const ATuple* cons) throw() { - ATuple* type = new ATuple(cons->head()->as_symbol(), NULL, Cursor()); + ATuple* type = new ATuple(cons->fst()->as_symbol(), NULL, Cursor()); List tlist(type); vector<CVal> fields; for (ATuple::const_iterator i = cons->iter_at(1); i != cons->end(); ++i) { @@ -161,7 +161,7 @@ compile_quote(CEnv& cenv, const ATuple* quote) throw() static CVal compile_call(CEnv& cenv, const ATuple* call) throw() { - CFunc f = resp_compile(cenv, call->head()); + CFunc f = resp_compile(cenv, call->fst()); if (!f) f = cenv.currentFn; // Recursive call (callee defined as a stub) @@ -170,7 +170,7 @@ compile_call(CEnv& cenv, const ATuple* call) throw() 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())->as_tuple(), args); + return cenv.engine()->compileCall(cenv, f, cenv.type(call->fst())->as_tuple(), args); } CVal @@ -193,7 +193,7 @@ resp_compile(CEnv& cenv, const AST* ast) throw() case T_TUPLE: { const ATuple* const call = ast->as_tuple(); - const ASymbol* const sym = call->head()->to_symbol(); + const ASymbol* const sym = call->fst()->to_symbol(); const std::string form = sym ? sym->sym() : ""; if (is_primitive(cenv.penv, call)) return cenv.engine()->compilePrimitive(cenv, ast->as_tuple()); |