aboutsummaryrefslogtreecommitdiffstats
path: root/src/resp.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-12-09 03:54:40 +0000
committerDavid Robillard <d@drobilla.net>2010-12-09 03:54:40 +0000
commitf8bb745beb481846e715cd1e455b3d688fe34d65 (patch)
tree5730d1dbf70ed6d42ef2786ea012896e9af28e42 /src/resp.cpp
parent39af9fe79809a67c837485d8edcae6b9246c5fa6 (diff)
downloadresp-f8bb745beb481846e715cd1e455b3d688fe34d65.tar.gz
resp-f8bb745beb481846e715cd1e455b3d688fe34d65.tar.bz2
resp-f8bb745beb481846e715cd1e455b3d688fe34d65.zip
Make environment always referenced by symbols.
Intern symbol strings, but not ASymbol objects themselves, so each symbol can have a different Cursor. Fixes missing locations in error reporting. git-svn-id: http://svn.drobilla.net/resp/resp@324 ad02d1e2-f140-0410-9f75-f8b11f17cedd
Diffstat (limited to 'src/resp.cpp')
-rw-r--r--src/resp.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/resp.cpp b/src/resp.cpp
index e745455..cef2d0c 100644
--- a/src/resp.cpp
+++ b/src/resp.cpp
@@ -39,7 +39,7 @@ is_form(const AST* ast, const std::string& form)
if (!sym)
return false;
- return sym->cppstr == form;
+ return form == sym->sym();
}
bool
@@ -53,7 +53,7 @@ is_primitive(const PEnv& penv, const AST* ast)
if (!sym)
return false;
- return penv.primitives.find(sym->cppstr) != penv.primitives.end();
+ return penv.primitives.find(sym->sym()) != penv.primitives.end();
}
int