aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-07-04 05:43:18 +0000
committerDavid Robillard <d@drobilla.net>2009-07-04 05:43:18 +0000
commit815e5dc20339e19c5bd299c3dcd69b6f88bf5317 (patch)
treeaaf1741b81421dc5cbaafe1a12f88cc0409e9555 /src
parent8d23d67e49f222756d327f886be6d7c47aa57772 (diff)
downloadresp-815e5dc20339e19c5bd299c3dcd69b6f88bf5317.tar.gz
resp-815e5dc20339e19c5bd299c3dcd69b6f88bf5317.tar.bz2
resp-815e5dc20339e19c5bd299c3dcd69b6f88bf5317.zip
Tidy.
git-svn-id: http://svn.drobilla.net/resp/tuplr@184 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src')
-rw-r--r--src/parse.cpp6
-rw-r--r--src/tuplr.hpp9
2 files changed, 6 insertions, 9 deletions
diff --git a/src/parse.cpp b/src/parse.cpp
index 1f16bfe..d36a92a 100644
--- a/src/parse.cpp
+++ b/src/parse.cpp
@@ -117,9 +117,9 @@ initLang(PEnv& penv, TEnv& tenv)
penv.defmac("def", macDef);
// Special forms
- penv.reg(true, "fn", PEnv::Handler(parseFn));
- penv.reg(true, "if", PEnv::Handler(parseCall<AIf>));
- penv.reg(true, "def", PEnv::Handler(parseCall<ADef>));
+ penv.reg(true, "fn", PEnv::Handler(parseFn));
+ penv.reg(true, "if", PEnv::Handler(parseCall<AIf>));
+ penv.reg(true, "def", PEnv::Handler(parseCall<ADef>));
// Numeric primitives
penv.reg(true, "+", PEnv::Handler(parseCall<APrimitive>));
diff --git a/src/tuplr.hpp b/src/tuplr.hpp
index 018607c..4b6c4bc 100644
--- a/src/tuplr.hpp
+++ b/src/tuplr.hpp
@@ -133,8 +133,8 @@ struct Object;
/// Garbage collector
struct GC {
enum Tag {
- TAG_AST = 2, ///< Abstract syntax tree node
- TAG_FRAME = 4 ///< Stack frame
+ TAG_AST = 1, ///< Abstract syntax tree node
+ TAG_FRAME = 2 ///< Stack frame
};
typedef std::list<const Object*> Roots;
typedef std::list<Object*> Heap;
@@ -236,7 +236,6 @@ struct ALiteral : public AST {
/// String, e.g. ""a""
struct AString : public AST, public std::string {
AString(Cursor c, const string& s) : AST(c), std::string(s) {}
- AString& operator=(const AString& rhs) { *this = rhs; return *this; }
bool operator==(const AST& rhs) const { return this == &rhs; }
void constrain(TEnv& tenv, Constraints& c) const {}
CValue compile(CEnv& cenv) { return NULL; }
@@ -519,9 +518,7 @@ struct PEnv : private map<const string, ASymbol*> {
if (tup) {
if (tup->empty()) throw Error(exp->loc, "call to empty list");
if (!tup->front()->to<const ATuple*>()) {
- const AString* str = tup->front()->to<const AString*>();
- assert(str);
- MF mf = mac(*str);
+ MF mf = mac(*tup->front()->to<const AString*>());
const AST* expanded = (mf ? mf(*this, exp) : exp);
const ATuple* expanded_tup = expanded->to<const ATuple*>();
const PEnv::Handler* h = handler(true, *expanded_tup->front()->to<const AString*>());