pub fn build<F, P>(source_file: P) -> Result<Program<F>, BuildError> where
F: VMFunc<F>,
P: AsRef<Path>,
Expand description
Parses, resolves and compiles given Itsy source file.
The name of the entry function must be main
. Modules are loaded from disk relative to the
given source file. For more control about how the files are loaded and processed,
see parser::parse, resolver::resolve and compiler::compile.
Use run or VM::run to execute the given program.