Function rustc_expand::mbe::quoted::parse_kleene_op
source · fn parse_kleene_op<'a>(
input: &mut impl Iterator<Item = &'a TokenTree>,
span: Span
) -> Result<Result<(KleeneOp, Span), Token>, Span>
Expand description
Parse the next token tree of the input looking for a KleeneOp. Returns
- Ok(Ok((op, span))) if the next token tree is a KleeneOp
- Ok(Err(tok, span)) if the next token tree is a token but not a KleeneOp
- Err(span) if the next token tree is not a token