mirror of
https://github.com/davidhalter/parso.git
synced 2025-12-10 06:31:57 +08:00
Fix an issue that created an endless loop.
This commit is contained in:
@@ -144,11 +144,11 @@ def _tokenize(code, start_pos=(1, 0)):
|
||||
search *= 3
|
||||
start += 2
|
||||
|
||||
index = code.find(search)
|
||||
index = code.find(search, start)
|
||||
if index == -1:
|
||||
index = len(code)
|
||||
expression += code[start:index]
|
||||
start = index
|
||||
start = index + 1
|
||||
elif found == '!' and len(code) > start and code[start] == '=':
|
||||
# This is a python `!=` and not a conversion.
|
||||
expression += found
|
||||
|
||||
@@ -142,7 +142,7 @@ FAILING_EXAMPLES = [
|
||||
# f-strings
|
||||
'f"{}"',
|
||||
'f"{\\}"',
|
||||
#'f"{\'\\\'}"',
|
||||
'f"{\'\\\'}"',
|
||||
'f"{#}"',
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user