diff options
Diffstat (limited to 'py/builtineval.c')
-rw-r--r-- | py/builtineval.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/py/builtineval.c b/py/builtineval.c index a8a7a476a3..c7bd6b6298 100644 --- a/py/builtineval.c +++ b/py/builtineval.c @@ -28,6 +28,7 @@ static mp_obj_t mp_builtin_eval(mp_obj_t o_in) { qstr parse_exc_id; const char *parse_exc_msg; mp_parse_node_t pn = mp_parse(lex, MP_PARSE_EVAL_INPUT, &parse_exc_id, &parse_exc_msg); + qstr source_name = mp_lexer_source_name(lex); mp_lexer_free(lex); if (pn == MP_PARSE_NODE_NULL) { @@ -36,7 +37,7 @@ static mp_obj_t mp_builtin_eval(mp_obj_t o_in) { } // compile the string - mp_obj_t module_fun = mp_compile(pn, false); + mp_obj_t module_fun = mp_compile(pn, source_name, false); if (module_fun == mp_const_none) { // TODO handle compile error correctly |