Expand description
Support for “peeking” into the token stream to decide how to parse.
Structs§
- AnyIdent 🔒
- A struct that can be used to match any identifier
- AnyLit 🔒
- A struct that can be used to match any literal
- LAngle 🔒
- This is the same as
RAngle
but for opening angle brackets. - Lookahead1 🔒
- Support for checking the next token in a stream to decide how to parse.
- RAngle 🔒
- There are some lexing ambiguities with
>>
which can represet both a right shift or two closing angle brackets in nested generics (e.g.,Vec<Option<i32>>
). We solve the ambiguity by giving>
a special token if it’s immediately followed by another>
, i.e.,>>
is tokenized asToken::GtFollowedByGt
followed byToken::Gt
.
Traits§
- Peek 🔒
- A trait for testing whether a token matches a rule.