File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4444#include "lib/mp-readline/readline.h"
4545
4646void do_str (const char * src , mp_parse_input_kind_t input_kind ) {
47- mp_lexer_t * lex = mp_lexer_new_from_str_len (MP_QSTR__lt_stdin_gt_ , src , strlen (src ), 0 );
48- if (lex == NULL ) {
49- printf ("MemoryError: lexer could not allocate memory\n" );
50- return ;
51- }
52-
5347 nlr_buf_t nlr ;
5448 if (nlr_push (& nlr ) == 0 ) {
49+ mp_lexer_t * lex = mp_lexer_new_from_str_len (MP_QSTR__lt_stdin_gt_ , src , strlen (src ), 0 );
5550 qstr source_name = lex -> source_name ;
5651 mp_parse_tree_t parse_tree = mp_parse (lex , input_kind );
5752 mp_obj_t module_fun = mp_compile (& parse_tree , source_name , MP_EMIT_OPT_NONE , true);
@@ -130,7 +125,7 @@ void gc_collect(void) {
130125}
131126
132127mp_lexer_t * mp_lexer_new_from_file (const char * filename ) {
133- return NULL ;
128+ mp_raise_OSError ( ENOENT ) ;
134129}
135130
136131mp_import_stat_t mp_import_stat (const char * path ) {
You can’t perform that action at this time.
0 commit comments