From 3c8089d1b10683ee31ddbaeebd0b18c47bf6d09d Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 6 Jun 2024 17:31:19 +1000 Subject: py/lexer: Support raw f-strings. Support for raw str/bytes already exists, and extending that to raw f-strings is easy. It also reduces code size because it eliminates an error message. Signed-off-by: Damien George --- tests/basics/string_fstring.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/basics/string_fstring.py') diff --git a/tests/basics/string_fstring.py b/tests/basics/string_fstring.py index 3a8969272d..d94cc0cd3e 100644 --- a/tests/basics/string_fstring.py +++ b/tests/basics/string_fstring.py @@ -75,3 +75,7 @@ print( f"cd---------------------------------" f"e{y}f---------------------------------" ) + +# Raw f-strings. +print(rf"\r\a\w {'f'} \s\t\r\i\n\g") +print(fr"\r{x}") -- cgit v1.2.3