tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit 67c4ee735b211527ec89a29a86b3e73b3019ca23
parent 3a1c16e8313997642507deb7e23bba1245bcf105
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Wed, 18 Dec 2019 17:52:15 -0800

Evaluate expression given to eval in global scope

Fixes defines since otherwise they would localized to each
individual loop in REPL

Diffstat:
tisp.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tisp.c b/tisp.c @@ -861,7 +861,7 @@ prim_eval(Tsp st, Hash env, Val args) tsp_arg_num(args, "eval", 1); if (!(v = tisp_eval(st, env, car(args)))) return NULL; - return (v = tisp_eval(st, env, v)) ? v : st->none; + return (v = tisp_eval(st, st->global, v)) ? v : st->none; } /* test equality of all values given */