aboutsummaryrefslogtreecommitdiff
path: root/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'runner.py')
-rw-r--r--runner.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/runner.py b/runner.py
index 8e4f86d..0d8560e 100644
--- a/runner.py
+++ b/runner.py
@@ -23,6 +23,12 @@ def evaluate(items, pop):
if not nxt.symbol.name in STD:
raise Exception(f"no such symbol: {nxt.symbol.name}")
this_func = STD[nxt.symbol.name]
+
+ # evaluate inner expressions
+ for idx, arg in enumerate(nxt.args):
+ if isinstance(arg, NebExpression):
+ nxt.args[idx] = evaluate([arg], pop)
+
if nxt.maybe_sig() not in this_func:
raise Exception(f"'{nxt.symbol.name}' called with unknown signature: '{nxt.maybe_sig()}'")
ret = this_func[nxt.maybe_sig()].impl(*(nxt.args))