mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Issue #15054: Fix incorrect tokenization of 'b' string literals.
Patch by Serhiy Storchaka.
This commit is contained in:
parent
2d9db1dfce
commit
8d5c0b8c19
3 changed files with 81 additions and 1 deletions
|
@ -127,7 +127,7 @@ Floatnumber = group(Pointfloat, Expfloat)
|
|||
Imagnumber = group(r'[0-9]+[jJ]', Floatnumber + r'[jJ]')
|
||||
Number = group(Imagnumber, Floatnumber, Intnumber)
|
||||
|
||||
StringPrefix = r'(?:[uU][rR]?|[bB][rR]|[rR][bB]|[rR]|[uU])?'
|
||||
StringPrefix = r'(?:[uUbB][rR]?|[rR][bB]?)?'
|
||||
|
||||
# Tail end of ' string.
|
||||
Single = r"[^'\\]*(?:\\.[^'\\]*)*'"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue