Eval errors are now correctly spanned

pull/2/head
ondra05 2021-08-29 00:16:15 +02:00
parent aa859a7566
commit 9f29211c55
1 changed files with 4 additions and 1 deletions

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