py/lexer: Properly handle unrecognized escapes of unicode chars.
Previously, only first byte of multibyte utf-8 was handled, leading to
overall incorrect encoding. Now we just add a backslash, and let next
character be handled normally (as if it wasn't quoted).
@@ -375,6 +375,7 @@ STATIC void parse_string_literal(mp_lexer_t *lex, bool is_raw) {
} else {
// unrecognised escape character; CPython lets this through verbatim as '\' and then the character
vstr_add_char(&lex->vstr, '\\');
+ continue;
}
break;
}
