Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
erezsh committed Jan 20, 2019
1 parent 8cc5337 commit c4f8483
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lark/load_grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,8 +510,7 @@ def compile(self):

empty_indices = [x==_EMPTY for i, x in enumerate(expansion)]
if any(empty_indices):
assert options
exp_options = copy(options)
exp_options = copy(options) if options else RuleOptions()
exp_options.empty_indices = empty_indices
expansion = [x for x in expansion if x!=_EMPTY]
else:
Expand Down

0 comments on commit c4f8483

Please sign in to comment.