Module lookahead

Module lookahead 

Source
Expand description

Support for “peeking” into the token stream to decide how to parse.

Structs§

AnyLit 🔒
A struct that can be used to match any literal
AnyOf 🔒
A rule that matches if any of the rules in a list matches
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.
NonReserved 🔒
A struct that can be used to match a non-reserved identifier
RAngle 🔒
There are some lexing ambiguities with >> because it can represet both a right shift or two closing angle brackets (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 as TokenKind::GtFollowedByGt followed by TokenKind::Gt.

Enums§

Expected
See PeekExpected

Traits§

Peek 🔒
A trait for testing whether a token matches a rule.
PeekExpected 🔒
A subtrait of Peek for rules that have an expected description.