find_child

Function find_child 

Source
pub(crate) fn find_child<'input>(
    pair: Pair<'input, Rule>,
    rule: Rule,
    context: &str,
) -> Result<Pair<'input, Rule>, Diagnostic>
Expand description

Find the first inner child of pair matching rule.

context is included in the error message to identify which builder asked for it (e.g. “If statement missing condition expression.”).