Skip to main content

run_parser

Function run_parser 

Source
pub fn run_parser(
    node: &Value,
    input: &str,
    pos: usize,
    caller: &mut dyn ClosureCaller,
) -> Result<(Value, usize), (usize, String)>
Expand description

Walk a parser AST. Returns (value, end_pos) on success or (failure_pos, message) on failure. The interpreter is the same shape as the original (in lex-runtime::builtins) plus the Map and AndThen cases that need closure invocation.