mirror of
https://github.com/davidhalter/jedi.git
synced 2026-05-13 10:08:44 +08:00
Small fix with big impact for the previously done simple_stmt error recovery. Now it actually works.
This commit is contained in:
@@ -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