Treat macros as HIR items

This commit is contained in:
inquisitivecrystal 2021-07-30 23:50:57 -07:00
parent ac50a53359
commit 8c62fa0575
31 changed files with 162 additions and 256 deletions

View file

@ -416,6 +416,14 @@ impl<'hir> Sig for hir::Item<'hir> {
Ok(sig)
}
hir::ItemKind::Macro(_) => {
let mut text = "macro".to_owned();
let name = self.ident.to_string();
text.push_str(&name);
text.push_str(&"! {}");
Ok(text_sig(text))
}
hir::ItemKind::Mod(ref _mod) => {
let mut text = "mod ".to_owned();
let name = self.ident.to_string();