Skip to main content

parse_recipe_at

Function parse_recipe_at 

Source
pub fn parse_recipe_at(
    text: &str,
    name: &str,
    scale: f64,
    file: Option<&Utf8Path>,
) -> Result<Outcome<Recipe>, CoreError>
Expand description

As parse_recipe, but attributing diagnostics to a specific file path.

Pass file when the text came from disk, so that diagnostics point at something the caller can open. An editor parsing an unsaved buffer passes None and still gets spans.