mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-03 07:04:49 +00:00
minor: unconfuse myself about macro def vs macro rules
This commit is contained in:
parent
a231da9d24
commit
16f7c3ea91
1 changed files with 5 additions and 0 deletions
|
@ -27,10 +27,15 @@ const TOKEN_LIMIT: usize = 524288;
|
||||||
|
|
||||||
#[derive(Debug, Clone, Eq, PartialEq)]
|
#[derive(Debug, Clone, Eq, PartialEq)]
|
||||||
pub enum TokenExpander {
|
pub enum TokenExpander {
|
||||||
|
/// Old-style `macro_rules`.
|
||||||
MacroRules(mbe::MacroRules),
|
MacroRules(mbe::MacroRules),
|
||||||
|
/// AKA macros 2.0.
|
||||||
MacroDef(mbe::MacroDef),
|
MacroDef(mbe::MacroDef),
|
||||||
|
/// Stuff like `line!` and `file!`.
|
||||||
Builtin(BuiltinFnLikeExpander),
|
Builtin(BuiltinFnLikeExpander),
|
||||||
|
/// `derive(Copy)` and such.
|
||||||
BuiltinDerive(BuiltinDeriveExpander),
|
BuiltinDerive(BuiltinDeriveExpander),
|
||||||
|
/// The thing we love the most here in rust-analyzer -- procedural macros.
|
||||||
ProcMacro(ProcMacroExpander),
|
ProcMacro(ProcMacroExpander),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue