Module rustc_parse::parser
source Β· ModulesΒ§
- attr_wrapper π
- diagnostics π
- expr π
- generics π
- item π
- nonterminal π
- pat π
- path π
- stmt π
- ty π
StructsΒ§
- CaptureState π
- ClosureSpans πStores span information about a closure.
- Restrictions π
- SeqSep πA sequence separator.
- TokenCursor πIterator over a
TokenStreamthat 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.
EnumsΒ§
- 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. - Whether or not to recover a
a, bwhen parsing patterns as(a, b)or that anda | b. - FlatToken π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. - Whether or not we should force collection of tokens for an AST node, regardless of whether or not it has attributes
- Whether or not to recover a
:when parsing patterns that were meant to be paths. - Whether or not to recover a
,when parsing or-patterns. - SemiColonMode π
- TokenDescription π
- TokenType π
- Trailing π
FunctionsΒ§
- token_descr π
Type AliasesΒ§
- ReplaceRange πIndicates a range of tokens that should be replaced by the tokens in the provided
AttrsTarget. This is used in two places during token collection: