Browse Source

Removed possibly problematic code (Issue #372)

tags/gm/2021-09-23T00Z/github.com--lark-parser-lark/0.7.2
Erez Shinan 6 years ago
parent
commit
f814d91f9d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      lark/load_grammar.py

+ 1
- 1
lark/load_grammar.py View File

@@ -520,7 +520,7 @@ class Grammar:
if alias and name.startswith('_'):
raise GrammarError("Rule %s is marked for expansion (it starts with an underscore) and isn't allowed to have aliases (alias=%s)" % (name, alias))

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


Loading…
Cancel
Save