Re-exportsΒ§
pub use token_type::ExpKeywordPair;pub use token_type::ExpTokenPair;pub use token_type::TokenType;
ModulesΒ§
- attr
- attr_
wrapper π - diagnostics π
- expr π
- generics π
- item π
- nonterminal π
- pat π
- path π
- stmt π
- token_
type - ty π
StructsΒ§
- Capture
State π - Closure
Spans π - Stores span information about a closure.
- Node
Range π - A token range within an individual AST nodeβs (lazy) token stream, i.e.
relative to that nodeβs first token. Distinct from
ParserRangeso the two kinds of range canβt be mixed up. - Parser
- Parser
Range π - A token range within a
Parserβs full token stream. - Restrictions π
- SeqSep π
- A sequence separator.
- Token
Cursor π - A
TokenStreamcursor that producesTokens. Itβs a bit odd that we (a) lex tokens into a nice tree structure (TokenStream), and then (b) use this type to emit them as a linear sequence. But a linear sequence is what the parser expects, for the most part. - Token
Tree πCursor
EnumsΒ§
- Attempt
Local Parse Recovery - Block
Mode π - Capturing π
- Controls how we capture tokens. Capturing can be expensive,
so we try to avoid performing capturing in cases where
we will never need an
AttrTokenStream. - Comma
Recovery Mode - Whether or not to recover a
a, bwhen parsing patterns as(a, b)or that anda | b. - Flat
Token π - A helper struct used when building an
AttrTokenStreamfrom aLazyAttrTokenStream. Both delimiter and non-delimited tokens are stored asFlatToken::Token. A vector ofFlatTokens is then βparsedβ to build up anAttrTokenStreamwith nestedAttrTokenTree::Delimitedtokens. - Followed
ByType - Force
Collect - Whether or not we should force collection of tokens for an AST node, regardless of whether or not it has attributes
- Parse
NtResult - Recover
Colon - Whether or not to recover a
:when parsing patterns that were meant to be paths. - Recover
Comma - Whether or not to recover a
,when parsing or-patterns. - Recovery
- Semi
Colon πMode - Token
Description π - Trailing π
FunctionsΒ§
Type AliasesΒ§
- Node
Replacement π - See the comment on
ParserReplacement. - Parser
Replacement π - Indicates a range of tokens that should be replaced by an
AttrsTarget(replacement) or be replaced by nothing (deletion). This is used in two places during token collection.