mirror of
https://github.com/davidhalter/parso.git
synced 2026-10-08 13:05:13 +08:00
Tokenizer: It should not be possible to break out of backslashes on the next line, even if it was an error
This commit is contained in:
1 parent
b12dd498bb
commit
556ce86cde
3 files changed
+27
-2
No files matched your search
@@ -549,7 +549,7 @@ def tokenize_lines(lines, version_info, start_pos=(1, 0), indents=None, is_first
|
||||
or (initial == '.' and token != '.' and token != '...')):
|
||||
yield PythonToken(NUMBER, token, spos, prefix)
|
||||
elif pseudomatch.group(3) is not None: # ordinary name
|
||||
if token in always_break_tokens:
|
||||
if token in always_break_tokens and (fstring_stack or paren_level):
|
||||
fstring_stack[:] = []
|
||||
paren_level = 0
|
||||
# We only want to dedent if the token is on a new line.
|
||||
|
||||
Reference in new issue
Block a user