mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 20:50:14 +01:00
Implement mp_parse_node_free; print properly repr(string).
This commit is contained in:
@@ -493,8 +493,8 @@ static void mp_lexer_next_token_into(mp_lexer_t *lex, mp_token_t *tok, bool firs
|
||||
}
|
||||
c = num;
|
||||
} else {
|
||||
// TODO error message
|
||||
assert(0);
|
||||
// unrecognised escape character; CPython lets this through verbatim as '\' and then the character
|
||||
vstr_add_char(&lex->vstr, '\\');
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -644,10 +644,10 @@ static void mp_lexer_next_token_into(mp_lexer_t *lex, mp_token_t *tok, bool firs
|
||||
}
|
||||
}
|
||||
|
||||
mp_lexer_t *mp_lexer_new(const char *src_name, void *stream_data, mp_lexer_stream_next_char_t stream_next_char, mp_lexer_stream_close_t stream_close) {
|
||||
mp_lexer_t *mp_lexer_new(qstr src_name, void *stream_data, mp_lexer_stream_next_char_t stream_next_char, mp_lexer_stream_close_t stream_close) {
|
||||
mp_lexer_t *lex = m_new(mp_lexer_t, 1);
|
||||
|
||||
lex->source_name = qstr_from_str(src_name);
|
||||
lex->source_name = src_name;
|
||||
lex->stream_data = stream_data;
|
||||
lex->stream_next_char = stream_next_char;
|
||||
lex->stream_close = stream_close;
|
||||
|
||||
Reference in New Issue
Block a user