add error messages on failed batch entry

This commit is contained in:
Mark Thom
2018-03-07 17:19:28 -07:00
parent beeb246632
commit ab182b6e3b
2 changed files with 14 additions and 12 deletions

View File

@@ -45,9 +45,11 @@ fn prolog_repl() {
match read() {
Input::Line(line) => parse_and_compile_line(&mut wam, line.as_str()),
Input::Batch(batch) => {
compile_listing(&mut wam, batch.as_str());
},
Input::Batch(batch) =>
match compile_listing(&mut wam, batch.as_str()) {
EvalSession::Error(e) => println!("{}", e),
_ => {}
},
Input::Quit => break,
Input::Clear => {
wam.clear();