aboutsummaryrefslogtreecommitdiffstats
path: root/src/cps.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-12-23 05:31:15 +0000
committerDavid Robillard <d@drobilla.net>2012-12-23 05:31:15 +0000
commit67319bf0410196787c753225f46057bc7c94beec (patch)
tree572e8f8989a903fde8be784de5dddbaa1938ecfe /src/cps.cpp
parent0375a20786f1e6eba9d128889f700b22d447021c (diff)
downloadresp-67319bf0410196787c753225f46057bc7c94beec.tar.gz
resp-67319bf0410196787c753225f46057bc7c94beec.tar.bz2
resp-67319bf0410196787c753225f46057bc7c94beec.zip
Move towards standard Scheme syntax.
git-svn-id: http://svn.drobilla.net/resp/trunk@442 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/cps.cpp')
-rw-r--r--src/cps.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cps.cpp b/src/cps.cpp
index c55f728..bb375a8 100644
--- a/src/cps.cpp
+++ b/src/cps.cpp
@@ -63,7 +63,7 @@ cps_fn(CEnv& cenv, const ATuple* fn, const AST* cont)
assert(fn->fst());
assert(copyProt.head);
List copy;
- copy.push_back(cenv.penv.sym("fn"));
+ copy.push_back(cenv.penv.sym("lambda"));
copy.push_back(copyProt);
for (ATuple::const_iterator i = fn->iter_at(2); i != fn->end(); ++i)
@@ -105,7 +105,7 @@ cps_call(CEnv& cenv, const ATuple* call, const AST* k)
std::vector<const AST*>::const_reverse_iterator a = args.rbegin();
for (ExpVec::const_reverse_iterator e = exprs.rbegin(); e != exprs.rend(); ++e, ++a) {
if (!is_value(cenv, *e)) {
- cont = resp_cps(cenv, *e, tup(Cursor(), cenv.penv.sym("fn"),
+ cont = resp_cps(cenv, *e, tup(Cursor(), cenv.penv.sym("lambda"),
tup(Cursor(), *a, 0),
cont,
0));
@@ -145,7 +145,7 @@ cps_if(CEnv& cenv, const ATuple* aif, const AST* k)
} else {
/*
const ASymbol* const condSym = cenv.penv.gensym("c");
- const ATuple* contFn = tup(loc, tenv.penv.sym("fn"),
+ const ATuple* contFn = tup(loc, tenv.penv.sym("lambda"),
tup(cond->loc, argSym, tenv.penv.gensym("_k"), 0),
tup(loc, tenv.penv.sym("if"), argSym,
exp->(tenv, cont),
@@ -166,9 +166,9 @@ resp_cps(CEnv& cenv, const AST* ast, const AST* k) throw()
if (call) {
const ASymbol* const sym = call->fst()->to_symbol();
const std::string form = sym ? sym->sym() : "";
- if (form == "def")
+ if (form == "define")
return cps_def(cenv, call, k);
- else if (form == "fn")
+ else if (form == "lambda")
return cps_fn(cenv, call, k);
else if (form == "if")
return cps_if(cenv, call, k);