summaryrefslogtreecommitdiffstatshomepage
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/lexer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/py/lexer.c b/py/lexer.c
index 3e7d589f61..17d711696b 100644
--- a/py/lexer.c
+++ b/py/lexer.c
@@ -454,8 +454,8 @@ STATIC void mp_lexer_next_token_into(mp_lexer_t *lex, bool first_token) {
{
mp_uint_t num = 0;
if (!get_hex(lex, (c == 'x' ? 2 : c == 'u' ? 4 : 8), &num)) {
- // TODO error message
- assert(0);
+ // not enough hex chars for escape sequence
+ lex->tok_kind = MP_TOKEN_INVALID;
}
c = num;
break;