Commit b9c47832 authored by Damien George's avatar Damien George
Browse files

py/lexer: Remove unreachable code in string tokeniser.

parent adccafb4
......@@ -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;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment