throw lexer errors from devour_whitespace (#1778)
This commit is contained in:
@@ -7393,9 +7393,15 @@ impl Machine {
|
||||
match self.machine_st.devour_whitespace(stream) {
|
||||
Ok(false) => { // not at EOF.
|
||||
}
|
||||
_ => {
|
||||
Ok(true) => {
|
||||
self.machine_st.fail = true;
|
||||
}
|
||||
Err(err) => {
|
||||
let stub = functor_stub(atom!("load"), 1);
|
||||
let err = self.machine_st.syntax_error(err);
|
||||
|
||||
return Err(self.machine_st.error_form(err, stub));
|
||||
}
|
||||
}
|
||||
|
||||
Ok(())
|
||||
|
||||
Reference in New Issue
Block a user