py/lexer: Remove unreachable code in string tokeniser.

This commit is contained in:
Damien George 2016-12-22 10:37:13 +11:00
parent adccafb42a
commit b9c4783273
1 changed files with 2 additions and 1 deletions

View File

@ -430,7 +430,8 @@ STATIC void mp_lexer_next_token_into(mp_lexer_t *lex, bool first_token) {
vstr_add_char(&lex->vstr, '\\'); vstr_add_char(&lex->vstr, '\\');
} else { } else {
switch (c) { 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 '\n': c = MP_LEXER_EOF; break; // backslash escape the newline, just ignore it
case '\\': break; case '\\': break;
case '\'': break; case '\'': break;