mirror of
https://github.com/davidhalter/parso.git
synced 2026-05-25 01:38:52 +08:00
Rename the last usage of ilabel to transition
This commit is contained in:
@@ -157,13 +157,13 @@ class PgenParser(object):
|
|||||||
|
|
||||||
def add_token(self, type_, value, start_pos, prefix):
|
def add_token(self, type_, value, start_pos, prefix):
|
||||||
"""Add a token; return True if this is the end of the program."""
|
"""Add a token; return True if this is the end of the program."""
|
||||||
ilabel = _token_to_transition(self.grammar, type_, value)
|
transition = _token_to_transition(self.grammar, type_, value)
|
||||||
stack = self.stack
|
stack = self.stack
|
||||||
grammar = self.grammar
|
grammar = self.grammar
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
plan = stack[-1].dfa.transition_to_plan[ilabel]
|
plan = stack[-1].dfa.transition_to_plan[transition]
|
||||||
break
|
break
|
||||||
except KeyError:
|
except KeyError:
|
||||||
if stack[-1].dfa.is_final:
|
if stack[-1].dfa.is_final:
|
||||||
|
|||||||
Reference in New Issue
Block a user