Expand description
Token types.
A token is created during lexing, and records information about a matched
Rule
(or failure to match).
It is idiomatic to use ilex::token;
and refer to types in this module with
a token
prefix. E.g., token::Any
, token::Ident
, and token::Stream
.
The token types themselves are thin immutable references into a
token::Stream
, and should be passed around by
value. They all implement Token
.
Structs§
- A bracket pair, such as matching
( ... )
, which contains a substream of tokens. - A cursor over a piece of a
Stream
. - A digital literal.
- A special token for the end of a file.
- A identifier, i.e., a self-delimiting word like
foo
or黒猫
. - A keyword, i.e., an exact well-known string, such as
+
,class
, and#define
. - A quoted literal.
- A tree-like stream of tokens.
- A token switch.
Enums§
Traits§
- A base 2 integer type of portable size that can be parsed from any radix.
- A token type. All types in
ilex::token
implement this trait.
Functions§
- Creates a new, empty token switch.