Skip to main content

try_match

Function try_match 

Source
pub fn try_match<F>(
    lines: &[&str],
    pattern: &[&str],
    start_index: usize,
    compare: F,
    eof: bool,
) -> Option<usize>
where F: Fn(&str, &str) -> bool,
Expand description

Search for a full pattern with a caller-supplied comparator, optionally anchored at EOF; mirrors patch-parser.ts:247-281.