pub fn compile_to_air(source: &str) -> MultiErrorResult<AirOutput>Expand description
Compile source code up to AIR (typed IR) without building CFG.
This is a test helper that runs: lexing → parsing → AST to RIR → semantic analysis. It stops before CFG construction, making it fast for testing type checking and semantic analysis.
§Example
ⓘ
use gruel_compiler::compile_to_air;
let result = compile_to_air("fn main() -> i32 { 1 + 2 * 3 }");
assert!(result.is_ok());