Skip to main content

Module token

Module token 

Source
Expand description

Parsers extracting tokens from the stream

Functionsยง

any
Matches one token
literal
Recognizes a literal
none_of
Recognize a token that does not match a set of tokens
one_of
Recognize a token that matches a set of tokens
rest
Return the remaining input.
rest_len
Return the length of the remaining input.
take
Recognize an input slice containing the first N input elements (I[..N]).
take_till
Recognize the longest input slice (bound by occurrences) till a member of a set of tokens is found.
take_until
Recognize the input slice (bound by occurrences) up to the first occurrence of a literal.
take_while
Recognize the longest input slice (bound by occurrences) that matches a set of tokens