Interpreter - Use EnvironmentRef in Callable

This commit is contained in:
Emmanuel BENOîT 2023-01-02 17:43:09 +01:00
parent 34619a8125
commit 1ad55e95f5

View file

@ -2,7 +2,7 @@ use std::fmt::Debug;
use crate::errors::InterpreterError; use crate::errors::InterpreterError;
use super::{Environment, Value}; use super::{EnvironmentRef, Value};
/// A callable is some object that supports being called. /// A callable is some object that supports being called.
pub trait Callable: Debug + ToString { pub trait Callable: Debug + ToString {
@ -13,7 +13,7 @@ pub trait Callable: Debug + ToString {
/// arguments. /// arguments.
fn call( fn call(
&self, &self,
environment: &mut Environment, environment: &EnvironmentRef,
arguments: &Vec<Value>, arguments: &Vec<Value>,
) -> Result<Value, InterpreterError>; ) -> Result<Value, InterpreterError>;
} }