diff options
author | Aleksey Kladov <[email protected]> | 2019-01-01 17:17:10 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2019-01-01 19:15:35 +0000 |
commit | 9d4af40995b4d01ad9b75dee0a000dd57b8bd87f (patch) | |
tree | 9d19b31673b031921bed71e5dce0bd9a6affe18a /crates/ra_hir/src/module | |
parent | 7dc45745a378c6feb6af524e8bd40e89bab7a822 (diff) |
work towards brining macros to nameres
Diffstat (limited to 'crates/ra_hir/src/module')
-rw-r--r-- | crates/ra_hir/src/module/nameres.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/ra_hir/src/module/nameres.rs b/crates/ra_hir/src/module/nameres.rs index 68eb02a98..46b1dc0b1 100644 --- a/crates/ra_hir/src/module/nameres.rs +++ b/crates/ra_hir/src/module/nameres.rs | |||
@@ -31,6 +31,7 @@ use crate::{ | |||
31 | Path, PathKind, | 31 | Path, PathKind, |
32 | HirDatabase, Crate, | 32 | HirDatabase, Crate, |
33 | Name, AsName, | 33 | Name, AsName, |
34 | macros::{MacroCallId, MacroCallLoc}, | ||
34 | module::{Module, ModuleId, ModuleTree}, | 35 | module::{Module, ModuleId, ModuleTree}, |
35 | }; | 36 | }; |
36 | 37 | ||
@@ -354,6 +355,18 @@ where | |||
354 | if item.kind == MODULE { | 355 | if item.kind == MODULE { |
355 | continue; | 356 | continue; |
356 | } | 357 | } |
358 | if item.kind == MACRO_CALL { | ||
359 | let loc = MacroCallLoc { | ||
360 | source_root_id: self.source_root, | ||
361 | module_id, | ||
362 | source_item_id: SourceItemId { | ||
363 | file_id, | ||
364 | item_id: Some(item.id), | ||
365 | }, | ||
366 | }; | ||
367 | let id = loc.id(self.db); | ||
368 | continue; | ||
369 | } | ||
357 | // depending on the item kind, the location can define something in | 370 | // depending on the item kind, the location can define something in |
358 | // the values namespace, the types namespace, or both | 371 | // the values namespace, the types namespace, or both |
359 | let kind = DefKind::for_syntax_kind(item.kind); | 372 | let kind = DefKind::for_syntax_kind(item.kind); |