diff --git a/ablescript/src/interpret.rs b/ablescript/src/interpret.rs index 656583a..cf85a10 100644 --- a/ablescript/src/interpret.rs +++ b/ablescript/src/interpret.rs @@ -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(())