pub fn match_for_balanced_group<'a, V1, T1, V2, T2>(
tokenizer: &mut Scanner<'a, u8>,
balance: &mut usize,
start: T1,
end: T2,
) -> ParseResult<()>Expand description
Try to recognize either a start group or an end group token.
If the start group token is recognized, increment the balancing counter. If the end group token is recognized, decrement the balancing counter. If neither is recognized, move the tokenizer by one byte.
§Arguments
tokenizer- The tokenizer to usebalance- A mutable reference to the balancing counterstart- The start group token to recognizeend- The end group token to recognize
§Errors
Returns Err(ParseError) if the tokenizer encounters an error.