cl-interpret: Builtin refactor
- Everything is different now - Builtins are now built on top of Rust functions, so they can be recursive! - TODO: allow macro-defined builtins to call each other? - The builtins! macro is a lot nicer to work with - No redundant return value - Maps the result over Into::into, allowing for type inference! - Uses explicit pattern syntax instead of weird binding, where possible - Does not #[allow(unused)], so you'll get unused variable warnings now!
This commit is contained in:
@@ -17,11 +17,6 @@ pub trait Callable: std::fmt::Debug {
|
||||
fn name(&self) -> Sym;
|
||||
}
|
||||
|
||||
/// [BuiltIn]s are [Callable]s with bespoke definitions
|
||||
pub trait BuiltIn: std::fmt::Debug + Callable {
|
||||
fn description(&self) -> &str;
|
||||
}
|
||||
|
||||
pub mod convalue;
|
||||
|
||||
pub mod interpret;
|
||||
|
||||
Reference in New Issue
Block a user