[−][src]Struct litto::lang::tinylang::TinyLang
A tiny Lisp-like language that only has lambda
, begin
, and define
.
Trait Implementations
impl AbstractValue<TinyLang> for Nil
[src]
impl AbstractValue<TinyLang> for NativeProcedure
[src]
fn apply(
&self,
env: &<TinyLang as Interpreter>::Env,
args: &[<TinyLang as Interpreter>::Expr]
) -> Result<<TinyLang as Interpreter>::Value, <TinyLang as Interpreter>::Error>
[src]
&self,
env: &<TinyLang as Interpreter>::Env,
args: &[<TinyLang as Interpreter>::Expr]
) -> Result<<TinyLang as Interpreter>::Value, <TinyLang as Interpreter>::Error>
impl AbstractValue<TinyLang> for Procedure
[src]
fn apply(
&self,
arg_env: &<TinyLang as Interpreter>::Env,
args: &[<TinyLang as Interpreter>::Expr]
) -> Result<<TinyLang as Interpreter>::Value, <TinyLang as Interpreter>::Error>
[src]
&self,
arg_env: &<TinyLang as Interpreter>::Env,
args: &[<TinyLang as Interpreter>::Expr]
) -> Result<<TinyLang as Interpreter>::Value, <TinyLang as Interpreter>::Error>
impl AbstractValue<TinyLang> for Bool
[src]
impl AbstractValue<TinyLang> for Int
[src]
impl AbstractValue<TinyLang> for Str
[src]
impl AbstractValue<TinyLang> for List
[src]
impl AbstractValue<TinyLang> for Quote
[src]
impl Clone for TinyLang
[src]
impl Interpreter for TinyLang
[src]
type Value = Value<TinyLang>
The value type the interpreter uses and returns. Read more
type Error = String
The error type that the interpreter raises. Read more
type Env = KvEnv<Self::Value>
The environment type that is used to evaluate code. Read more
type Expr = Sexp<Self::Value>
The expression type. Read more
fn parse(code: &str) -> Result<Self::Expr, Self::Error>
[src]
fn global_env() -> Self::Env
[src]
fn evaluate(
env: &Self::Env,
expr: &Self::Expr
) -> Result<Self::Value, Self::Error>
[src]
env: &Self::Env,
expr: &Self::Expr
) -> Result<Self::Value, Self::Error>
fn interpret(code: &str) -> Result<Self::Value, Self::Error>
[src]
Auto Trait Implementations
impl RefUnwindSafe for TinyLang
impl Send for TinyLang
impl Sync for TinyLang
impl Unpin for TinyLang
impl UnwindSafe for TinyLang
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,