diff --git a/src/app_mrb_repl.c b/src/app_mrb_repl.c index 385596d..e7caeb8 100644 --- a/src/app_mrb_repl.c +++ b/src/app_mrb_repl.c @@ -235,6 +235,14 @@ int app_mrb_repl_exec(bool *exit) { /* TODO: Compile block and feed to VM */ /* TODO: Adjust CXT->lineno */ + if(parser->nerr) { + printf("Error at line %d: %s\n", parser->error_buffer[0].lineno, parser->error_buffer[0].message); + } + + if(parser->nwarn) { + printf("Warn at line %d: %s\n", parser->warn_buffer[0].lineno, parser->warn_buffer[0].message); + } + mrb_gc_arena_restore(s_mrb_state, s_gc_arena_idx); /* We are done with current block, free buffer */