paralegal_flow::ann::parse

Function dict

Source
pub fn dict<'a, K: 'a, V: 'a, P: Parser<I<'a>, K, Error<I<'a>>> + 'a, G: Parser<I<'a>, V, Error<I<'a>>> + 'a>(
    keys: P,
    values: G,
) -> impl FnMut(I<'a>) -> IResult<I<'a>, Vec<(K, V)>>
Expand description

Parse something dictionnary-like.

Expects the next token to be a braces delimited subtree containing pairs of keys and values that are comme separated and where each key and value is separated with an =. E.g. something of the form { k1 = v1, k2 = v2, ...}