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

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

No files matched your search

+4
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