Skip to main content

Module parser

Module parser 

Source
Expand description

Recipe parsing and conversion of cooklang reports into Diagnostics.

cooklang parses leniently, so a recipe can parse successfully and still have something to say about itself. The CLI used to log those warnings and drop them; here they come back to the caller in the Outcome.

Statics§

PARSER
The shared parser. Matches CookCLI’s configuration exactly: no extensions, default converter for unit support.

Functions§

parse_recipe
Parse recipe text, scale it, and collect diagnostics.
parse_recipe_at
As parse_recipe, but attributing diagnostics to a specific file path.
render_report
Render a parse report the way the CLI prints it, with source line context.