show macros in file structure

This commit is contained in:
Ekaterina Babshukova 2019-06-29 00:08:02 +03:00
parent 5d829841cd
commit 46c453d0d3
2 changed files with 25 additions and 5 deletions

View file

@ -142,6 +142,13 @@ fn structure_node(node: &SyntaxNode) -> Option<StructureNode> {
};
Some(node)
})
.visit(|mc: &ast::MacroCall| {
let first_token = mc.syntax().first_token().unwrap();
if first_token.text().as_str() != "macro_rules" {
return None;
}
decl(mc)
})
.accept(node)?
}
@ -177,6 +184,10 @@ impl E {}
impl fmt::Debug for E {}
macro_rules! mc {
() => {}
}
#[deprecated]
fn obsolete() {}