Module rustc_parse::parser

source Β·



  • 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.
  • CaptureState πŸ”’
  • Stores span information about a closure.
  • Restrictions πŸ”’
  • SeqSep πŸ”’
    A sequence separator.
  • TokenCursor πŸ”’
    Iterator over a TokenStream 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.



Type Aliases§

  • 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: