aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
authormryouse2022-06-05 03:34:12 +0000
committermryouse2022-06-05 03:34:12 +0000
commit3899312e81d383d4900dc95b9d96faf1cc73db15 (patch)
tree37c21d723898630b2e5af23af19f11838026829b /interpreter.py
parent86104621edc9758155909e0b6e7b9822190815fc (diff)
bugfix: Bool, not Boolean
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/interpreter.py b/interpreter.py
index 47b2363..60338f1 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -389,7 +389,7 @@ def interpretBranch(symbol, args, env):
if len(arg.args) != 2:
raise InterpretPanic(symbol, "each branch requires two expressions")
cond = evaluate(arg.args[0], env) # this is the condition
- if not isinstance(cond, Boolean):
+ if not isinstance(cond, Bool):
raise InterpretPanic(symbol, "branch condition must be :bool", cond)
if cond.value:
return evaluate(arg.args[1], env)
@@ -467,7 +467,7 @@ def interpretListLength(symbol, args, env):
ev = evaluate(args[0], env)
if not isinstance(ev, List):
raise InterpretPanic(symbol, "requires a :list", ev)
- return Literal(len(ev.args))
+ return Int(len(ev.args))
GLOBALS.register("list-length", Builtin(interpretListLength, 1))