Interpreter - Callable extends Debug and ToString

This commit is contained in:
Emmanuel BENOîT 2023-01-02 17:40:06 +01:00
parent 696a363ec6
commit 34619a8125

View file

@ -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.
pub trait Callable {
pub trait Callable: Debug + ToString {
/// Return the amount of arguments supported by the callable.
fn arity(&self) -> usize;