mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-29 13:24:57 +00:00
Handle t-string prefixes in SimpleTokenizer
(#20578)
The simple tokenizer is meant to skip strings, but it was recording a `Name` token for t-strings (from the `t`). This PR fixes that.
This commit is contained in:
parent
cfc64d1707
commit
f2b7c82534
4 changed files with 54 additions and 0 deletions
|
@ -599,6 +599,16 @@ impl<'a> SimpleTokenizer<'a> {
|
|||
| "rb"
|
||||
| "rf"
|
||||
| "u"
|
||||
| "T"
|
||||
| "TR"
|
||||
| "Tr"
|
||||
| "RT"
|
||||
| "Rt"
|
||||
| "t"
|
||||
| "tR"
|
||||
| "tr"
|
||||
| "rT"
|
||||
| "rt"
|
||||
)
|
||||
{
|
||||
self.bogus = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue