Skip to main content

punct

Function punct 

Source
pub fn punct<'t, 's: 't, I>(
    c: char,
) -> impl Parser<'t, I, (), ParserError<'t, 's>> + Clone
where I: TokenInput<'t, 's>,
Expand description

Match a single punctuation character, e.g. punct(':').

The lexer emits every non-alphanumeric, non-whitespace character as its own Token::Punct, so this is the token-level just(':').