aboutsummaryrefslogtreecommitdiff
path: root/interpreter.py
diff options
context:
space:
mode:
Diffstat (limited to 'interpreter.py')
-rw-r--r--interpreter.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/interpreter.py b/interpreter.py
index 2f6dc3d..3cbd2cd 100644
--- a/interpreter.py
+++ b/interpreter.py
@@ -793,3 +793,12 @@ def interpretAssert(symbol, args, env):
return List([])
GLOBALS.register("assert", Builtin(interpretAssert, [Arg("cond", TypeEnum.BOOL, False, False)]))
+
+def interpretHowTo(symbol, args, env):
+ if not isinstance(args[0], Symbol):
+ raise InterpretPanic(symbol, "expects a symbol", args[0])
+ sym = env.get(args[0].name)
+ print(sym.describe(args[0].name))
+ return List([])
+
+GLOBALS.register("howto", Builtin(interpretHowTo, [Arg("symbol", TypeEnum.ANY, False, True)]))