Skip to main content

lower

Function lower 

Source
pub fn lower(src: &str, file: &Path) -> LowerResult
Expand description

Convenience: parse + lower + resolve in one step. Concatenates the diagnostics from each stage so callers can render them uniformly.

ยงExamples

use std::path::Path;

let result = mos_eval::lower("= Hello\n", Path::new("main.mos"));

assert!(!result.has_errors());
assert_eq!(result.document.len(), 3);