Eval errors are now correctly spanned

This commit is contained in:
Erin 2021-08-29 00:16:15 +02:00 committed by ondra05
parent c764cda7c7
commit 0cf8576a77

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(())