From 16f7c3ea916fd16d9d94d6703c3af38a32515f98 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Tue, 4 May 2021 18:20:10 +0300 Subject: minor: unconfuse myself about macro def vs macro rules --- crates/hir_expand/src/db.rs | 5 +++++ 1 file changed, 5 insertions(+) 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; #[derive(Debug, Clone, Eq, PartialEq)] pub enum TokenExpander { + /// Old-style `macro_rules`. MacroRules(mbe::MacroRules), + /// AKA macros 2.0. MacroDef(mbe::MacroDef), + /// Stuff like `line!` and `file!`. Builtin(BuiltinFnLikeExpander), + /// `derive(Copy)` and such. BuiltinDerive(BuiltinDeriveExpander), + /// The thing we love the most here in rust-analyzer -- procedural macros. ProcMacro(ProcMacroExpander), } -- cgit v1.2.3