Skip to content

Commit

Permalink
Merge branch 'main' of https://github.com/CodeVisionaries/larktools i…
Browse files Browse the repository at this point in the history
…nto test/pytest
  • Loading branch information
julia-sprenger committed Oct 2, 2024
2 parents 39ce70b + c852d83 commit e8a23b7
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/larktools/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
def eval_arith_expr(node, env):
child = get_children(node)[0]
child_name = get_name(child)
if child_name != "sum":
breakpoint()
assert child_name == "sum"
return eval_sum(child, env)

Expand Down Expand Up @@ -99,10 +97,10 @@ def eval_atom(node, env):
def eval_neg_atom(node, env):
# the "-" character appearing in the production rule is
# filtered out by lark by default because it is a constant
# character. Thereore, it doesn't appear among the child nodes
# 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(node, env))


def eval_bracketed_arith_expr(node, env):
Expand Down

0 comments on commit e8a23b7

Please sign in to comment.