Skip to main content

compile_source

Function compile_source 

Source
pub fn compile_source(source: &str) -> Result<Chunk, String>
Expand description

Lex, parse, type-check, and compile source to bytecode in one call. Bails on the first type error. For callers that need diagnostics rather than early exit, use harn_parser::check_source directly and then call Compiler::new().compile(&program).