pub fn ident<C: Character, E: Error<C>>(
) -> impl Parser<C, C::Collection, Error = E> + Copy + Clone
Expand description
A parser that accepts a C-style identifier.
The output type of this parser is Character::Collection
(i.e: String
when C
is char
, and Vec<u8>
when C
is u8
).
An identifier is defined as an ASCII alphabetic character or an underscore followed by any number of alphanumeric
characters or underscores. The regex pattern for it is [a-zA-Z_][a-zA-Z0-9_]*
.