Small fix with big impact for the previously done simple_stmt error recovery. Now it actually works.
This commit is contained in:
1 parent
2b7434342e
commit
bb747a83e8
1 file changed
+1
-1
@@ -230,7 +230,7 @@ class Parser(object):
|
|||||||
|
|
||||||
index, symbol, nodes = current_suite(stack)
|
index, symbol, nodes = current_suite(stack)
|
||||||
if symbol == 'simple_stmt':
|
if symbol == 'simple_stmt':
|
||||||
index -= 1
|
index -= 2
|
||||||
(_, _, (typ, suite_nodes)) = stack[index]
|
(_, _, (typ, suite_nodes)) = stack[index]
|
||||||
symbol = grammar.number2symbol[typ]
|
symbol = grammar.number2symbol[typ]
|
||||||
suite_nodes.append(pt.Node(symbol, list(nodes)))
|
suite_nodes.append(pt.Node(symbol, list(nodes)))
|
||||||
|
|||||||
Reference in new issue
Block a user