repl: add output when leaving from c-d

This commit is contained in:
Luna 2019-10-20 13:13:32 -03:00
parent c75db19523
commit bb501d9c1e
1 changed files with 4 additions and 1 deletions

View File

@ -109,7 +109,10 @@ pub fn doRepl(allocator: *std.mem.Allocator, args_it: var) !void {
lang.reset();
var rd_line = readline.readline(c"> ");
if (rd_line == null) break;
if (rd_line == null) {
std.debug.warn("leaving from eof\n");
break;
}
readline.add_history(rd_line);
//defer std.heap.c_allocator.destroy(rd_line);