Eval errors are now correctly spanned

This commit is contained in:
Erin 2021-08-29 00:16:15 +02:00 committed by ondra05
parent a8c603164c
commit 3ce85a11ee

View file

@ -355,7 +355,10 @@ impl ExecEnv {
}
let stmts = crate::parser::Parser::new(&code).init()?;
self.eval_stmts(&stmts)?;
self.eval_stmts(&stmts).map_err(|x| Error {
span: span.clone(),
..x
})?;
}
}
Ok(())