mirror of
https://github.com/python/cpython.git
synced 2025-08-10 03:49:18 +00:00
[3.12] gh-105820: Fix tok_mode expression buffer in file & readline tokenizer (GH-105828) (#105832)
(cherry picked from commit d382ad4915
)
Co-authored-by: Lysandros Nikolaou <lisandrosnik@gmail.com>
This commit is contained in:
parent
abb4eaa46f
commit
e9cf5a324e
4 changed files with 38 additions and 4 deletions
|
@ -558,6 +558,19 @@ def"', """\
|
|||
OP '}' (1, 39) (1, 40)
|
||||
FSTRING_MIDDLE ' final words' (1, 40) (1, 52)
|
||||
FSTRING_END "'" (1, 52) (1, 53)
|
||||
""")
|
||||
self.check_tokenize("""\
|
||||
f'''{
|
||||
3
|
||||
=}'''""", """\
|
||||
FSTRING_START "f'''" (1, 0) (1, 4)
|
||||
OP '{' (1, 4) (1, 5)
|
||||
NL '\\n' (1, 5) (1, 6)
|
||||
NUMBER '3' (2, 0) (2, 1)
|
||||
NL '\\n' (2, 1) (2, 2)
|
||||
OP '=' (3, 0) (3, 1)
|
||||
OP '}' (3, 1) (3, 2)
|
||||
FSTRING_END "'''" (3, 2) (3, 5)
|
||||
""")
|
||||
|
||||
def test_function(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue