Module parser

Source

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§

CaptureState πŸ”’
ClosureSpans πŸ”’
Stores span information about a closure.
NodeRange πŸ”’
A token range within an individual AST node’s (lazy) token stream, i.e. relative to that node’s first token. Distinct from ParserRange so the two kinds of range can’t be mixed up.
Parser
ParserRange πŸ”’
A token range within a Parser’s full token stream.
Restrictions πŸ”’
SeqSep πŸ”’
A sequence separator.
TokenCursor πŸ”’
A TokenStream cursor that produces Tokens. 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.
TokenTreeCursor πŸ”’

Enums§

AttemptLocalParseRecovery
BlockMode πŸ”’
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.
CommaRecoveryMode
Whether or not to recover a a, b when parsing patterns as (a, b) or that and a | b.
FlatToken πŸ”’
A helper struct used when building an AttrTokenStream from a LazyAttrTokenStream. Both delimiter and non-delimited tokens are stored as FlatToken::Token. A vector of FlatTokens is then β€˜parsed’ to build up an AttrTokenStream with nested AttrTokenTree::Delimited tokens.
FollowedByType
ForceCollect
Whether or not we should force collection of tokens for an AST node, regardless of whether or not it has attributes
ParseNtResult
RecoverColon
Whether or not to recover a : when parsing patterns that were meant to be paths.
RecoverComma
Whether or not to recover a , when parsing or-patterns.
Recovery
SemiColonMode πŸ”’
TokenDescription πŸ”’
Trailing πŸ”’

Functions§

make_unclosed_delims_error πŸ”’
token_descr

Type Aliases§

NodeReplacement πŸ”’
See the comment on ParserReplacement.
ParserReplacement πŸ”’
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.