add quit/q commands to repl

This commit is contained in:
Luna 2019-10-05 21:44:44 -03:00
parent f8814ca94d
commit 8c5f42b3db

View file

@ -94,6 +94,9 @@ pub fn doRepl(allocator: *std.mem.Allocator, args_it: var) !void {
try file.seekTo(0);
try printer.printList(cmds, stream);
continue;
} else if (std.mem.eql(u8, line, "quit") or std.mem.eql(u8, line, "q")) {
std.debug.warn("leaving\n");
break;
}
var cmds_parsed = lang.parse(line) catch |err| {