]> git.lizzy.rs Git - nothing.git/commitdiff
(#537) Introduce t binding that evaluates to t
authorrexim <reximkut@gmail.com>
Sun, 16 Dec 2018 18:12:42 +0000 (01:12 +0700)
committerrexim <reximkut@gmail.com>
Sun, 16 Dec 2018 18:12:42 +0000 (01:12 +0700)
src/ebisp/interpreter.c

index 8b7964c1d8d1c5ed876d7fd4b6231ffdf0ac067d..2f7fa14b648afa0975a9c13bd57758ac2bada0f7 100644 (file)
@@ -398,7 +398,6 @@ greaterThan(void *param, Gc *gc, struct Scope *scope, struct Expr args)
     }
 
     if (x > y) {
-        /* TODO(#537): in ebisp t is not a special symbol that evaluates to itself */
         return eval_success(SYMBOL(gc, "t"));
     } else {
         return eval_success(NIL(gc));
@@ -427,6 +426,11 @@ void load_std_library(Gc *gc, struct Scope *scope)
         scope,
         SYMBOL(gc, "list"),
         NATIVE(gc, list_op, NULL));
+    set_scope_value(
+        gc,
+        scope,
+        SYMBOL(gc, "t"),
+        SYMBOL(gc, "t"));
 }
 
 struct EvalResult