Interpreter - Callable extends Debug and ToString
This commit is contained in:
parent
696a363ec6
commit
34619a8125
1 changed files with 7 additions and 1 deletions
|
@ -1,5 +1,11 @@
|
||||||
|
use std::fmt::Debug;
|
||||||
|
|
||||||
|
use crate::errors::InterpreterError;
|
||||||
|
|
||||||
|
use super::{Environment, Value};
|
||||||
|
|
||||||
/// A callable is some object that supports being called.
|
/// A callable is some object that supports being called.
|
||||||
pub trait Callable {
|
pub trait Callable: Debug + ToString {
|
||||||
/// Return the amount of arguments supported by the callable.
|
/// Return the amount of arguments supported by the callable.
|
||||||
fn arity(&self) -> usize;
|
fn arity(&self) -> usize;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue