Skip to content

Commit

Permalink
Fixed bug #2: Assertion failing in wrong way
Browse files Browse the repository at this point in the history
  • Loading branch information
rindPHI committed Jun 29, 2023
1 parent 8d325b9 commit 31232f6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "grammar_graph"
version = "0.1.14"
version = "0.1.15"
authors = [
{ name="Dominic Steinhöfel", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion src/grammar_graph/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.14"
__version__ = "0.1.15"
2 changes: 1 addition & 1 deletion src/grammar_graph/gg.py
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ def recurse(label: str) -> Node:
new_node = NonterminalNode(label, children_nodes)
nonterminal_nodes[label] = new_node

assert grammar[label], f"Grammar has no rules for {label}"
assert label in grammar, f"Grammar has no rules for {label}"
for nr, expansion in enumerate(grammar[label]):
expansion_children_nodes = []
if len(expansion) == 0:
Expand Down

0 comments on commit 31232f6

Please sign in to comment.