mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Refactor primary IDE API
This introduces the new type -- Semantics. Semantics maps SyntaxNodes to various semantic info, such as type, name resolution or macro expansions. To do so, Semantics maintains a HashMap which maps every node it saw to the file from which the node originated. This is enough to get all the necessary hir bits just from syntax.
This commit is contained in:
parent
04deae3dba
commit
c3a4c4429d
49 changed files with 1026 additions and 978 deletions
|
@ -26,6 +26,7 @@ macro_rules! impl_froms {
|
|||
}
|
||||
}
|
||||
|
||||
mod semantics;
|
||||
pub mod db;
|
||||
pub mod source_analyzer;
|
||||
pub mod source_binder;
|
||||
|
@ -45,8 +46,8 @@ pub use crate::{
|
|||
StructField, Trait, Type, TypeAlias, TypeParam, Union, VariantDef,
|
||||
},
|
||||
has_source::HasSource,
|
||||
source_analyzer::{PathResolution, ScopeEntryWithSyntax, SourceAnalyzer},
|
||||
source_binder::SourceBinder,
|
||||
semantics::{original_range, Semantics, SemanticsScope},
|
||||
source_analyzer::{PathResolution, ScopeEntryWithSyntax},
|
||||
};
|
||||
|
||||
pub use hir_def::{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue