rust-analyzer/crates/ide/src/syntax_highlighting
bors[bot] d70ea759b3
Merge #11663
11663: Internal: Add hir_def::MacroId, add Macro{Id} to ModuleDef{Id} r=Veykril a=Veykril

With this we can now handle macros like we handle ModuleDefs making them work more like other definitions and allowing us to remove a bunch of special cases. This also enables us to track the modules these macros are defined in, instead of only recording the crate they come from.

Introduces a new class of `MacroId`s (for each of the 3 macro kinds) into `hir_def`. We can't reuse `MacroDefId` as that is defined in `hir_expand` which doesn't know of modules, so now we have two different macro ids, this unfortunately requires some back and forth mapping between the two via database accesses which I hope won't be too expensive.

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2022-03-09 10:26:34 +00:00
..
test_data Emit more detailed highlighting for %, >>, << 2022-03-07 20:16:03 +11:00
format.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
highlight.rs Merge #11663 2022-03-09 10:26:34 +00:00
highlights.rs more clippy fixes 2021-10-16 12:32:55 +01:00
html.rs Use FileAstId<ast::Adt> in nameres where appropriate instead 2022-01-07 14:20:27 +01:00
inject.rs internal: Re-arrange ide_db modules 2022-03-06 19:04:04 +01:00
injector.rs internal: Simplify and optimize syntax_highlighting 2022-03-06 03:49:54 +01:00
macro_.rs internal: Simplify and optimize syntax_highlighting 2022-03-06 03:49:54 +01:00
tags.rs Fix highlighting of Self 2022-03-05 23:34:37 +01:00
tests.rs Emit more detailed highlighting for %, >>, << 2022-03-07 20:16:03 +11:00