diff options
author | Edwin Cheng <[email protected]> | 2020-03-22 07:00:44 +0000 |
---|---|---|
committer | Edwin Cheng <[email protected]> | 2020-03-22 07:00:44 +0000 |
commit | bb22a4e386c13a17b518a3822d343f6dd3dc4398 (patch) | |
tree | 260af0f85f02d70f24f153ed7704e045542bb25f /crates/ra_ide_db/src | |
parent | 6fe956420fc63609a84dd005b8190b1f19fff280 (diff) |
Add support for macro in symbo_index
Diffstat (limited to 'crates/ra_ide_db/src')
-rw-r--r-- | crates/ra_ide_db/src/symbol_index.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/crates/ra_ide_db/src/symbol_index.rs b/crates/ra_ide_db/src/symbol_index.rs index 884359ee3..0f46f93c1 100644 --- a/crates/ra_ide_db/src/symbol_index.rs +++ b/crates/ra_ide_db/src/symbol_index.rs | |||
@@ -362,6 +362,13 @@ fn to_symbol(node: &SyntaxNode) -> Option<(SmolStr, SyntaxNodePtr, TextRange)> { | |||
362 | ast::TypeAliasDef(it) => { decl(it) }, | 362 | ast::TypeAliasDef(it) => { decl(it) }, |
363 | ast::ConstDef(it) => { decl(it) }, | 363 | ast::ConstDef(it) => { decl(it) }, |
364 | ast::StaticDef(it) => { decl(it) }, | 364 | ast::StaticDef(it) => { decl(it) }, |
365 | ast::MacroCall(it) => { | ||
366 | if it.is_macro_rules().is_some() { | ||
367 | decl(it) | ||
368 | } else { | ||
369 | None | ||
370 | } | ||
371 | }, | ||
365 | _ => None, | 372 | _ => None, |
366 | } | 373 | } |
367 | } | 374 | } |