Skip to content

Commit

Permalink
Merge pull request #154 from martineberlein/master
Browse files Browse the repository at this point in the history
Update expansion_key to handle empty alternatives
  • Loading branch information
andreas-zeller committed Feb 8, 2023
2 parents f798843 + 95b2704 commit f5fb56c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/code/GrammarCoverageFuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,10 @@ def expansion_key(symbol: str,
if isinstance(expansion, tuple):
# Expansion or single derivation tree
expansion, _ = expansion

# Check for empty list expansion
if isinstance(expansion, list) and not expansion:
expansion = ""

if not isinstance(expansion, str):
# Derivation tree
Expand Down

0 comments on commit f5fb56c

Please sign in to comment.