summaryrefslogtreecommitdiff
path: root/environment.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'environment.cpp')
-rw-r--r--environment.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/environment.cpp b/environment.cpp
index 3ca55b1..b38d73b 100644
--- a/environment.cpp
+++ b/environment.cpp
@@ -5,7 +5,7 @@
using namespace std;
-#undef DEBUG
+#define DEBUG
void Environment::load(const Environment &other){
@@ -25,14 +25,6 @@ void Environment::define(const Name &name,const Hook &hook){
hooks[name]=hook;
}
-void Environment::define2(const Name &name,const Hook2 &hook2){
- hooks[name]=[hook2](Environment &env,const AST &arg1) -> AST {
- return AST::makeNative([&env,arg1,hook2](const AST &arg2) -> AST {
- return hook2(env,arg1,arg2);
- });
- };
-}
-
AST Environment::get(const Name &name){
auto it=defs.find(name);
if(it==defs.end()){
@@ -277,7 +269,7 @@ static bool hasFree(AST &ast,Index fromIndex){
return false;
case AST::Type::name:
- return true;
+ return false;
case AST::Type::index:
return ast.indexval>=fromIndex;