diff options
Diffstat (limited to 'runner.py')
| -rw-r--r-- | runner.py | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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)) |
