Trait oftlisp::InterpreterContext
[−]
[src]
pub trait InterpreterContext: Context + Sized { type RuntimeError: Debug; fn eval(
expr: Gc<Self::Expr>,
env: &mut GcLinkedList<(Symbol, Gc<Value<Self>>)>
) -> Result<Gc<Value<Self>>, Self::RuntimeError>; fn primitives() -> HashMap<Symbol, Gc<Value<Self>>>; }
A Context
that allows for the running of OftLisp
code.
Associated Types
type RuntimeError: Debug
An error encountered at runtime.
Required Methods
fn eval(
expr: Gc<Self::Expr>,
env: &mut GcLinkedList<(Symbol, Gc<Value<Self>>)>
) -> Result<Gc<Value<Self>>, Self::RuntimeError>
expr: Gc<Self::Expr>,
env: &mut GcLinkedList<(Symbol, Gc<Value<Self>>)>
) -> Result<Gc<Value<Self>>, Self::RuntimeError>
Evaluates an expression.
fn primitives() -> HashMap<Symbol, Gc<Value<Self>>>
Returns the values in the std/internal/primitives
module.