Interpreter - CallableRef type alias
This commit is contained in:
parent
d450f186b4
commit
7b8405119b
2 changed files with 5 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
use std::fmt::Debug;
|
||||
use std::{cell::RefCell, fmt::Debug, rc::Rc};
|
||||
|
||||
use crate::errors::InterpreterError;
|
||||
|
||||
|
@ -17,3 +17,6 @@ pub trait Callable: Debug + ToString {
|
|||
arguments: Vec<Value>,
|
||||
) -> Result<Value, InterpreterError>;
|
||||
}
|
||||
|
||||
/// A reference to a callable.
|
||||
pub type CallableRef = Rc<RefCell<dyn Callable>>;
|
||||
|
|
|
@ -4,7 +4,7 @@ mod interpretable;
|
|||
mod native_fn;
|
||||
mod value;
|
||||
|
||||
pub use callable::Callable;
|
||||
pub use callable::{Callable, CallableRef};
|
||||
pub use environment::*;
|
||||
pub use interpretable::*;
|
||||
pub use value::*;
|
||||
|
|
Loading…
Reference in a new issue