[−][src]Module rustc_expand::mbe
This module implements declarative macros: old macro_rules and the newer
macro. Declarative macros are also known as "macro by example", and that's
why we call this module mbe. For external documentation, prefer the
official terminology: "declarative macros".
Modules
| macro_check | Checks that meta-variables in macro definition are correctly declared and used. |
| macro_parser | This is an NFA-based parser, which calls out to the main rust parser for named non-terminals (which it commits to fully when it hits one in a grammar). There's a set of current NFA threads and a set of next ones. Instead of NTs, we have a special case for Kleene star. The big-O, in pathological cases, is worse than traditional use of NFA or Earley parsing, but it's an easier fit for Macro-by-Example-style rules. |
| macro_rules | |
| quoted | |
| transcribe |
Structs
| Delimited | Contains the sub-token-trees of a "delimited" token tree, such as the contents of |
| KleeneToken | |
| SequenceRepetition |
Enums
| KleeneOp | A Kleene-style repetition operator for token sequences. |
| TokenTree | Similar to |