From 5a3a9cc90deac022474d9f4bb99206d8e941bb98 Mon Sep 17 00:00:00 2001 From: gschnabel <40870991+gschnabel@users.noreply.github.com> Date: Wed, 2 Oct 2024 16:09:32 +0200 Subject: [PATCH] Fix `eval_atom` and `eval_neg_atom` function --- src/larktools/evaluation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/larktools/evaluation.py b/src/larktools/evaluation.py index 3fc6edd..d480b68 100644 --- a/src/larktools/evaluation.py +++ b/src/larktools/evaluation.py @@ -89,7 +89,7 @@ def eval_atom(node, env): varname = get_value(child) return env[varname] elif child_name == "neg_atom": - return eval_neg_atom(node, env) + return eval_neg_atom(child, env) elif child_name == "bracketed_arith_expr": return eval_bracketed_arith_expr(child, env) @@ -100,7 +100,7 @@ def eval_neg_atom(node, env): # character. Therefore, it doesn't appear among the child nodes child = get_children(node)[0] assert get_name(child) == "atom" - return (-eval_atom(node, env)) + return (-eval_atom(child, env)) def eval_bracketed_arith_expr(node, env):