Module macro_declaration
Source - CapturedValue
- Information about a captured value in a macro.
- MacroDeclarationData
- The semantic data for a macro declaration.
- MacroExpansionResult
- The result of expanding a macro rule.
- MacroRuleData
- The semantic data for a single macro rule in a macro declaration.
- MatcherContext
- Context used during macro pattern matching and expansion.
Tracks captured values, active repetition scopes, and repetition ownership per placeholder.
- RepetitionId
- A unique identifier for a repetition block inside a macro rule.
Each
$( ... ) group in the macro pattern gets a new RepetitionId.
- MacroDeclarationSemantic
- Trait for macro declaration-related semantic queries.
- expand_macro_rule
- Traverse the macro expansion and replace the placeholders with the provided values, creates a
string representation of the expanded macro.
- is_macro_rule_match
- Given a macro declaration and an input token tree, checks if the input the given rule, and
returns the captured params if it does.