use cl_interpret::{ env::Environment, error::IResult, interpret::Interpret, temp_type_impl::ConValue, }; #[derive(Clone, Debug)] pub struct Context { pub env: Environment, } impl Context { pub fn new() -> Self { Self { env: Environment::new() } } pub fn with_env(env: Environment) -> Self { Self { env } } pub fn run(&mut self, code: &impl Interpret) -> IResult { code.interpret(&mut self.env) } } impl Default for Context { fn default() -> Self { Self::new() } }