Function recipe_parser::parse

source ·
pub fn parse(i: &str) -> IResult<&str, Vec<Token<'_>>>
Expand description

It returns a list with the parsed tokens

This function is useful if you want to build your own render on top of recipe-lang

Example:

use recipe_parser::parse;

let input = "Take the {potatoe}(1) and boil it";
let result = parse(input).expect("recipe could not be parsed");

println!("{result:?}");