From b9c4783273bfe794a6be2be6b02aedcd9bd80d64 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 22 Dec 2016 10:37:13 +1100 Subject: [PATCH] py/lexer: Remove unreachable code in string tokeniser. --- py/lexer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py/lexer.c b/py/lexer.c index 7db49de895..0611a727b9 100644 --- a/py/lexer.c +++ b/py/lexer.c @@ -430,7 +430,8 @@ STATIC void mp_lexer_next_token_into(mp_lexer_t *lex, bool first_token) { vstr_add_char(&lex->vstr, '\\'); } else { switch (c) { - case MP_LEXER_EOF: break; // TODO a proper error message? + // note: "c" can never be MP_LEXER_EOF because next_char + // always inserts a newline at the end of the input stream case '\n': c = MP_LEXER_EOF; break; // backslash escape the newline, just ignore it case '\\': break; case '\'': break;