Modules

expr 🔒
generics 🔒
item 🔒
pat 🔒
path 🔒
stmt 🔒
ty 🔒

Structs

A wrapper type to ensure that the parser handles outer attributes correctly. When we parse outer attributes, we need to ensure that we capture tokens for the attribute target. This allows us to perform cfg-expansion on a token stream before we invoke a derive proc-macro.

Stores span information about a closure.

SeqSep 🔒

A sequence separator.

Enums

BlockMode 🔒

Controls how we capture tokens. Capturing can be expensive, so we try to avoid performing capturing in cases where we will never need an AttrAnnotatedTokenStream

Whether or not to recover a a, b when parsing patterns as (a, b) or that and a | b.

A helper struct used when building an AttrAnnotatedTokenStream from a LazyTokenStream. Both delimiter and non-delimited tokens are stored as FlatToken::Token. A vector of FlatTokens is then ‘parsed’ to build up an AttrAnnotatedTokenStream with nested AttrAnnotatedTokenTree::Delimited tokens

Whether or not we should force collection of tokens for an AST node, regardless of whether or not it has attributes

Specifies how to parse a path.

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.

TokenType 🔒

Functions

Type Definitions

Indicates a range of tokens that should be replaced by the tokens in the provided vector. This is used in two places during token collection: