diff options
Diffstat (limited to 'unix')
| -rw-r--r-- | unix/main.c | 14 | ||||
| -rw-r--r-- | unix/mpconfigport.h | 2 |
2 files changed, 9 insertions, 7 deletions
diff --git a/unix/main.c b/unix/main.c index 39a772d1e..35fca2059 100644 --- a/unix/main.c +++ b/unix/main.c @@ -53,9 +53,11 @@ static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind qstr source_name = mp_lexer_source_name(lex); mp_lexer_free(lex); - //printf("----------------\n"); - //mp_parse_node_show(pn, 0); - //printf("----------------\n"); + /* + printf("----------------\n"); + mp_parse_node_print(pn, 0); + printf("----------------\n"); + */ mp_obj_t module_fun = mp_compile(pn, source_name, is_repl); @@ -73,10 +75,10 @@ static void execute_from_lexer(mp_lexer_t *lex, mp_parse_input_kind_t input_kind // uncaught exception mp_obj_t exc = (mp_obj_t)nlr.ret_val; if (MP_OBJ_IS_TYPE(exc, &exception_type)) { - qstr file; + qstr file, block; machine_uint_t line; - mp_obj_exception_get_source_info(exc, &file, &line); - printf("File \"%s\", line %d\n", qstr_str(file), (int)line); + mp_obj_exception_get_source_info(exc, &file, &line, &block); + printf("File \"%s\", line %d, in %s\n", qstr_str(file), (int)line, qstr_str(block)); } mp_obj_print(exc, PRINT_REPR); printf("\n"); diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h index b36c17196..10abb8ce7 100644 --- a/unix/mpconfigport.h +++ b/unix/mpconfigport.h @@ -9,11 +9,11 @@ #define MICROPY_EMIT_THUMB (0) #define MICROPY_EMIT_INLINE_THUMB (0) #define MICROPY_MEM_STATS (1) +#define MICROPY_DEBUG_PRINTERS (1) #define MICROPY_ENABLE_REPL_HELPERS (1) #define MICROPY_ENABLE_LEXER_UNIX (1) #define MICROPY_ENABLE_FLOAT (1) #define MICROPY_LONGINT_IMPL (MICROPY_LONGINT_IMPL_LONGLONG) -#define MICROPY_SHOW_BC (0) // type definitions for the specific machine |
