Fix diff parser: Don't copy DEDENT tokens at the beginning

This commit is contained in:
Dave Halter
2019-01-17 21:31:13 +01:00
parent e591b929eb
commit 52d01685ba
2 changed files with 26 additions and 2 deletions

View File

@@ -622,6 +622,10 @@ class _NodesTree(object):
new_nodes.append(node)
while new_nodes and new_nodes[0].type == 'error_leaf' \
and new_nodes[0].token_type in _INDENTATION_TOKENS:
new_nodes.pop(0)
if not new_nodes:
return [], working_stack, prefix