Skip to main content

compile_units

Function compile_units 

Source
pub fn compile_units<'a>(
    sources: &[&str],
    arena: &'a Arena,
) -> Result<(Ir, StratifiedProgram<'a>)>
Expand description

Compiles multiple source units into the Mangle Intermediate Representation (IR).

Each source string is parsed into a separate AST unit, renamed independently (handling Package/Use directives), and then merged into a single unit for stratification and lowering.

This enables multi-unit compilation where one unit can declare a Package and another can Use it with qualified predicate references.