pub fn terminated_parser<T, P, F: FnMut(ParseStream<'_>) -> Result<T>>(
terminator: P,
parser: F,
) -> impl FnOnce(ParseStream<'_>) -> Result<Punctuated<T, P::Token>>Expand description
Returns a syn::parse::Parser which parses a stream of zero or more occurrences of T
separated by punctuation of type P, with optional trailing punctuation.
This is functionally the same as Punctuated::parse_terminated,
but accepts a closure rather than a function pointer.