aboutsummaryrefslogtreecommitdiffstats
path: root/tuplr.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-06-20 18:42:10 +0000
committerDavid Robillard <d@drobilla.net>2009-06-20 18:42:10 +0000
commit5423a36aee3156332183bc59c097a907e4d8c503 (patch)
tree78fbd2e405b19154ef7119969f2753205a6995c1 /tuplr.cpp
parenta34fdc61633467976971f4bd88c7c32d353fa8d0 (diff)
downloadresp-5423a36aee3156332183bc59c097a907e4d8c503.tar.gz
resp-5423a36aee3156332183bc59c097a907e4d8c503.tar.bz2
resp-5423a36aee3156332183bc59c097a907e4d8c503.zip
Shorten AST names to match code names.
git-svn-id: http://svn.drobilla.net/resp/tuplr@136 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'tuplr.cpp')
-rw-r--r--tuplr.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tuplr.cpp b/tuplr.cpp
index de7d8a1..af7dae1 100644
--- a/tuplr.cpp
+++ b/tuplr.cpp
@@ -175,7 +175,7 @@ parseFn(PEnv& penv, const SExp& exp, void* arg)
else if (exp.size() < 3)
throw Error(exp.loc, "Missing function body");
SExp::const_iterator a = exp.begin(); ++a;
- AClosure* ret = new AClosure(exp.loc, penv.sym("fn"), new ATuple(penv.parseTuple(*a++)));
+ AFn* ret = new AFn(exp.loc, penv.sym("fn"), new ATuple(penv.parseTuple(*a++)));
while (a != exp.end())
ret->push_back(penv.parse(*a++));
return ret;
@@ -206,7 +206,7 @@ initLang(PEnv& penv, TEnv& tenv)
// Special forms
penv.reg(true, "fn", PEnv::Handler(parseFn));
penv.reg(true, "if", PEnv::Handler(parseCall<AIf>));
- penv.reg(true, "def", PEnv::Handler(parseCall<ADefinition>));
+ penv.reg(true, "def", PEnv::Handler(parseCall<ADef>));
// Numeric primitives
penv.reg(true, "+", PEnv::Handler(parseCall<APrimitive>));
@@ -252,7 +252,7 @@ eval(CEnv& cenv, const string& name, istream& is)
exprs.push_back(make_pair(exp, result));
// Add definitions as GC roots
- if (result->to<ADefinition*>())
+ if (result->to<ADef*>())
cenv.lock(result);
// Add types in type substition as GC roots
@@ -319,7 +319,7 @@ repl(CEnv& cenv)
finishFunction(cenv, f, retVal);
cenv.out << call(cenv, f, bodyT);
} catch (Error& e) {
- ADefinition* def = body->to<ADefinition*>();
+ ADef* def = body->to<ADef*>();
if (def)
cenv.out << def->sym();
else
@@ -329,7 +329,7 @@ repl(CEnv& cenv)
cenv.out << " : " << cenv.type(body) << endl;
// Add definitions as GC roots
- if (body->to<ADefinition*>())
+ if (body->to<ADef*>())
cenv.lock(body);
Object::pool.collect(Object::pool.roots());