mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-11 07:01:59 +08:00
Remove some code that wasn't doing anything.
This commit is contained in:
@@ -222,15 +222,14 @@ class Parser(BaseParser):
|
|||||||
stack[-1][2][1].append(error_leaf)
|
stack[-1][2][1].append(error_leaf)
|
||||||
|
|
||||||
def _stack_removal(self, pgen_grammar, stack, arcs, start_index, value, start_pos):
|
def _stack_removal(self, pgen_grammar, stack, arcs, start_index, value, start_pos):
|
||||||
failed_stack = []
|
failed_stack = False
|
||||||
found = False
|
found = False
|
||||||
all_nodes = []
|
all_nodes = []
|
||||||
for dfa, state, (typ, nodes) in stack[start_index:]:
|
for dfa, state, (type_, nodes) in stack[start_index:]:
|
||||||
if nodes:
|
if nodes:
|
||||||
found = True
|
found = True
|
||||||
if found:
|
if found:
|
||||||
symbol = pgen_grammar.number2symbol[typ]
|
failed_stack = True
|
||||||
failed_stack.append((symbol, nodes))
|
|
||||||
all_nodes += nodes
|
all_nodes += nodes
|
||||||
if failed_stack:
|
if failed_stack:
|
||||||
stack[start_index - 1][2][1].append(tree.PythonErrorNode(all_nodes))
|
stack[start_index - 1][2][1].append(tree.PythonErrorNode(all_nodes))
|
||||||
|
|||||||
Reference in New Issue
Block a user