mirror of
https://github.com/davidhalter/parso.git
synced 2026-01-03 01:53:47 +08:00
Fix working with async functions in the diff parser, fixes #56
This commit is contained in:
@@ -682,6 +682,8 @@ class _NodesTree(object):
|
||||
last = new_nodes[-1]
|
||||
if last.type == 'decorated':
|
||||
last = last.children[-1]
|
||||
if last.type in ('async_funcdef', 'async_stmt'):
|
||||
last = last.children[-1]
|
||||
last_line_offset_leaf = last.children[-2].get_last_leaf()
|
||||
assert last_line_offset_leaf == ':'
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user