Trait oftlisp::CompilerContext
[−]
[src]
pub trait CompilerContext: Context + Sized { type CompileError: Debug; fn compile(
main_mod: Symbol,
modules: HashMap<Symbol, ExportedModule<Self>>
) -> Result<Vec<u8>, Self::CompileError>; }
A Context
that allows for the compilation of OftLisp
code.
Associated Types
type CompileError: Debug
An error encountered during compilation.
Required Methods
fn compile(
main_mod: Symbol,
modules: HashMap<Symbol, ExportedModule<Self>>
) -> Result<Vec<u8>, Self::CompileError>
main_mod: Symbol,
modules: HashMap<Symbol, ExportedModule<Self>>
) -> Result<Vec<u8>, Self::CompileError>
Compiles a module.
This function gets passed the name of the main module, as well as the module and its dependencies.
It should return the contents of the object file.