Struct oftlisp_anf::Context
[−]
[src]
pub struct Context;
The Context
provided by this crate.
Methods
impl Context
[src]
fn apply(
func: Gc<Value<Self>>,
args: Vec<Gc<Value<Self>>>
) -> Result<Gc<Value<Self>>, RuntimeError>
[src]
func: Gc<Value<Self>>,
args: Vec<Gc<Value<Self>>>
) -> Result<Gc<Value<Self>>, RuntimeError>
Applies a function to the given arguments.
Trait Implementations
impl CompilerContext for Context
[src]
type CompileError = CompileError
An error encountered during compilation.
fn compile(
main_module: Symbol,
exported_modules: HashMap<Symbol, ExportedModule<Self>>
) -> Result<Vec<u8>, Self::CompileError>
[src]
main_module: Symbol,
exported_modules: HashMap<Symbol, ExportedModule<Self>>
) -> Result<Vec<u8>, Self::CompileError>
Compiles a module. Read more
impl InterpreterContext for Context
[src]
type RuntimeError = RuntimeError
An error encountered at runtime.
fn eval(
expr: Gc<Expr>,
env: &mut GcLinkedList<(Symbol, Gc<Value<Self>>)>
) -> Result<Gc<Value<Self>>, RuntimeError>
[src]
expr: Gc<Expr>,
env: &mut GcLinkedList<(Symbol, Gc<Value<Self>>)>
) -> Result<Gc<Value<Self>>, RuntimeError>
Evaluates an expression.
fn primitives() -> HashMap<Symbol, Gc<Value<Self>>>
[src]
Returns the values in the std/internal/primitives
module.
impl Clone for Context
[src]
fn clone(&self) -> Context
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more
impl Debug for Context
[src]
impl Finalize for Context
[src]
impl Trace for Context
[src]
unsafe fn trace(&self)
[src]
Marks all contained Gc
s.
unsafe fn root(&self)
[src]
Increments the root-count of all contained Gc
s.
unsafe fn unroot(&self)
[src]
Decrements the root-count of all contained Gc
s.
fn finalize_glue(&self)
[src]
Runs Finalize::finalize() on this object and all contained subobjects Read more
impl Drop for Context
[src]
impl OftLispContext for Context
[src]
type BuiltinFunction = BuiltinFunction
The type of a function implemented by the runtime.
type Expr = Expr
The type of an expression in the AST.
type ObjectVtable = HashMap<Symbol, Gc<Value<Context>>>
The type of the vtable of an object.
type UserFunction = UserFunction
The type of a user function. This probably should just be the arguments (as an Args<C>
), the body (as C::Expr
), and the variables closed over and their values (as a GcLinkedList<(Symbol, Value<C>)>
). Read more
type ValueMeta = ()
The metadata attached to the value.
fn from_expr(expr: Gc<AstExpr<Self>>) -> Gc<Expr>
[src]
Converts a standard ast::Expr
to the expression type of the context.