aboutsummaryrefslogtreecommitdiff
path: root/neb/std/boolean.py
diff options
context:
space:
mode:
Diffstat (limited to 'neb/std/boolean.py')
-rw-r--r--neb/std/boolean.py25
1 files changed, 0 insertions, 25 deletions
diff --git a/neb/std/boolean.py b/neb/std/boolean.py
index 973fa67..e716a87 100644
--- a/neb/std/boolean.py
+++ b/neb/std/boolean.py
@@ -3,31 +3,6 @@ from ..structs import *
BOOLEAN = Environment()
-def interpretOr(symbol, args, env, ns):
- # or returns true for the first expression that returns true
- for arg in args:
- ev = evaluate(arg, env, ns)
- if not isinstance(ev, Bool):
- raise InterpretPanic(symbol, "requires :bool arguments")
- if ev.value == True:
- return ev
- return Bool(False)
-
-or_arg = Arg("arg", TypeEnum.BOOL, lazy=True)
-BOOLEAN.register("or", Builtin("or", interpretOr, [or_arg, or_arg], or_arg, Type(":bool")))
-
-def interpretAnd(symbol, args, env, ns):
- # and returns false for the first expression that returns false
- for arg in args:
- ev = evaluate(arg, env, ns)
- if not isinstance(ev, Bool):
- raise InterpretPanic(symbol, "requires :bool arguments")
- if ev.value == False:
- return ev
- return Bool(True)
-
-BOOLEAN.register("and", Builtin("and", interpretAnd, [or_arg, or_arg], or_arg, Type(":bool")))
-
def interpretEq(symbol, args, env, ns):
# NOTE this currently only works for literals
# compare types because 0 != #false in neb