Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
erezsh committed Jun 30, 2024
1 parent 99ec1fb commit 1ca39d4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lark/parsers/grammar_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,13 +177,13 @@ def __init__(self, parser_conf: ParserConf, debug: bool=False, strict: bool=Fals

self.FIRST, self.FOLLOW, self.NULLABLE = calculate_sets(rules)

def expand_rule(self, source_rule: NonTerminal, rules_by_origin=None) -> State:
def expand_rule(self, source_rule: NonTerminal, rules_by_origin=None) -> OrderedSet[RulePtr]:
"Returns all init_ptrs accessible by rule (recursive)"

if rules_by_origin is None:
rules_by_origin = self.rules_by_origin

init_ptrs = OrderedSet()
init_ptrs = OrderedSet[RulePtr]()
def _expand_rule(rule: NonTerminal) -> Iterator[NonTerminal]:
assert not rule.is_term, rule

Expand Down

0 comments on commit 1ca39d4

Please sign in to comment.