Function punctuated_until

Source
pub(crate) fn punctuated_until<E: Peek, R>(
    cx: &mut ParseCtxt<'_>,
    sep: Token,
    end: E,
    parse: impl FnMut(&mut ParseCtxt<'_>) -> ParseResult<R>,
) -> ParseResult<Vec<R>>
Expand description

Parses a list of zero or more items separated by a punctuation, with optional trailing punctuation. Parsing continues until the requested end token is reached. This does not consume the end token.