mirror of
https://github.com/davidhalter/parso.git
synced 2026-04-26 09:26:01 +08:00
Fix get_start_pos_of_prefix
This commit is contained in:
@@ -125,7 +125,7 @@ class PythonLeaf(PythonMixin, Leaf):
|
||||
# indent error leafs somehow? No idea how, though.
|
||||
previous_leaf = self.get_previous_leaf()
|
||||
if previous_leaf is not None and previous_leaf.type == 'error_leaf' \
|
||||
and previous_leaf.token_type in ('INDENT', 'ERROR_DEDENT'):
|
||||
and previous_leaf.token_type in ('INDENT', 'DEDENT', 'ERROR_DEDENT'):
|
||||
previous_leaf = previous_leaf.get_previous_leaf()
|
||||
|
||||
if previous_leaf is None: # It's the first leaf.
|
||||
|
||||
Reference in New Issue
Block a user