Skip to main content

compile_program

Function compile_program 

Source
pub fn compile_program(
    ast: &TypedAst,
    src: &str,
) -> Result<Program, Vec<QalaError>>
Expand description

the codegen module’s public entry: lower a typed program to bytecode.

errors accumulate rather than fail-fast – a constant-folding overflow or a comptime budget exhaustion in one function does not stop the others from compiling. on success returns Ok(Program); on any errors returns Err(Vec<QalaError>) sorted by (span.start, span.len) for deterministic rendering.