mirror of
https://github.com/davidhalter/parso.git
synced 2026-11-01 09:16:21 +08:00
Tokenizer: Add error dedents only if parens are not open
This commit is contained in:
1 parent
8e49d8ab5f
commit
cf880f43d4
2 files changed
+3
-3
No files matched your search
@@ -498,7 +498,7 @@ def tokenize_lines(lines, version_info, start_pos=(1, 0)):
|
||||
pseudomatch = pseudo_token.match(line, pos)
|
||||
if not pseudomatch: # scan for tokens
|
||||
match = whitespace.match(line, pos)
|
||||
if pos == 0:
|
||||
if pos == 0 and paren_level == 0:
|
||||
for t in dedent_if_necessary(match.end()):
|
||||
yield t
|
||||
pos = match.end()
|
||||
|
||||
Reference in new issue
Block a user