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 --- py/parse.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'py/parse.c') diff --git a/py/parse.c b/py/parse.c index 1392303e6..4ba956073 100644 --- a/py/parse.c +++ b/py/parse.c @@ -1351,9 +1351,6 @@ mp_parse_tree_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind) { } else if (lex->tok_kind == MP_TOKEN_MALFORMED_FSTRING) { exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, MP_ERROR_TEXT("malformed f-string")); - } else if (lex->tok_kind == MP_TOKEN_FSTRING_RAW) { - exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, - MP_ERROR_TEXT("raw f-strings are not supported")); #endif } else { exc = mp_obj_new_exception_msg(&mp_type_SyntaxError, -- cgit v1.2.3