aboutsummaryrefslogtreecommitdiff
path: root/crates/hir_expand
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2021-05-04 16:20:10 +0100
committerAleksey Kladov <[email protected]>2021-05-04 16:20:10 +0100
commit16f7c3ea916fd16d9d94d6703c3af38a32515f98 (patch)
tree9ce56e77a468579f84c4e4dd3a7a7d1f2b67a5e8 /crates/hir_expand
parenta231da9d245dc280b082f2d8795f8e6bf16e409a (diff)
minor: unconfuse myself about macro def vs macro rules
Diffstat (limited to 'crates/hir_expand')
-rw-r--r--crates/hir_expand/src/db.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/hir_expand/src/db.rs b/crates/hir_expand/src/db.rs
index 1e4b0cc19..b77795b2e 100644
--- a/crates/hir_expand/src/db.rs
+++ b/crates/hir_expand/src/db.rs
@@ -27,10 +27,15 @@ const TOKEN_LIMIT: usize = 524288;
27 27
28#[derive(Debug, Clone, Eq, PartialEq)] 28#[derive(Debug, Clone, Eq, PartialEq)]
29pub enum TokenExpander { 29pub enum TokenExpander {
30 /// Old-style `macro_rules`.
30 MacroRules(mbe::MacroRules), 31 MacroRules(mbe::MacroRules),
32 /// AKA macros 2.0.
31 MacroDef(mbe::MacroDef), 33 MacroDef(mbe::MacroDef),
34 /// Stuff like `line!` and `file!`.
32 Builtin(BuiltinFnLikeExpander), 35 Builtin(BuiltinFnLikeExpander),
36 /// `derive(Copy)` and such.
33 BuiltinDerive(BuiltinDeriveExpander), 37 BuiltinDerive(BuiltinDeriveExpander),
38 /// The thing we love the most here in rust-analyzer -- procedural macros.
34 ProcMacro(ProcMacroExpander), 39 ProcMacro(ProcMacroExpander),
35} 40}
36 41