propagate syntax errors from read_term when they're not UnexpectedEOF (#507)

This commit is contained in:
Mark Thom
2020-05-16 23:10:38 -06:00
parent 69706ecab0
commit b3cff6555f

View File

@@ -730,13 +730,16 @@ impl MachineState {
if orig_stream.options.eof_action == EOFAction::Reset { if orig_stream.options.eof_action == EOFAction::Reset {
if self.fail == false { if self.fail == false {
continue; continue;
} else {
return Ok(());
} }
} }
return Ok(());
} }
return Ok(()); let stub = MachineError::functor_stub(clause_name!("read_term"), 3);
let err = MachineError::syntax_error(self.heap.h(), err);
return Err(self.error_form(err, stub));
} }
} }
} }