summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2023-02-18 23:27:30 -0800
committerKai Stevenson <kai@kaistevenson.com>2023-02-18 23:27:30 -0800
commit51659aa7b33baa490a614255996f3e372e86a67c (patch)
tree594fdd6abe4f28cff477d63af37933fdb90a6005 /src
parente8df5cd395569ddd944900ec7f22236db491b5a8 (diff)
fixed eval() scoping
Diffstat (limited to 'src')
-rw-r--r--src/eval.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/eval.c b/src/eval.c
index 8319676..1f87bf5 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -98,15 +98,15 @@ sym_t* try_eval_internal(sym_t* symbol, hashtable_t* symbolScope) {
return symbol->args[0];
}
else if (hash == get_hash("eval")) {
- hashtable_t* newScope = init_hashtable(50, symbolScope);
+ //hashtable_t* newScope = init_hashtable(50, symbolScope);
sym_t* v;
if (symbol->argCount > 1) {
- v = eval_with_args(eval(symbol->args[0], symbolScope), symbol->args + 1, symbol->argCount - 1, newScope);
+ v = eval_with_args(eval(symbol->args[0], symbolScope), symbol->args + 1, symbol->argCount - 1, symbolScope);
}
else {
- v = eval(eval(symbol->args[0], symbolScope), newScope);
+ v = eval(eval(symbol->args[0], symbolScope), symbolScope);
}
- destroy_hashtable(newScope);
+ //destroy_hashtable(newScope);
return v;
}
else if (hash == get_hash("store")) {