mirror of
https://github.com/davidhalter/parso.git
synced 2026-11-01 09:16:21 +08:00
Fix diff parser: Don't copy DEDENT tokens at the beginning
This commit is contained in:
1 parent
e591b929eb
commit
52d01685ba
2 files changed
+26
-2
No files matched your search
@@ -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
|
||||
|
||||
|
||||
Reference in new issue
Block a user