docs
This commit is contained in:
parent
d47075af52
commit
18000ba864
@ -1,4 +1,19 @@
|
||||
//! Name resolution algorithm
|
||||
//! Name resolution algorithm. The end result of the algorithm is `ItemMap`: a
|
||||
//! map with maps each module to it's scope: the set of items, visible in the
|
||||
//! module. That is, we only resolve imports here, name resolution of item
|
||||
//! bodies will be done in a separate step.
|
||||
//!
|
||||
//! Like Rustc, we use an interative per-crate algorithm: we start with scopes
|
||||
//! containing only directly defined items, and then iteratively resolve
|
||||
//! imports.
|
||||
//!
|
||||
//! To make this work nicely in the IDE scenarios, we place `InputModuleItems`
|
||||
//! in between raw syntax and name resolution. `InputModuleItems` are computed
|
||||
//! using only the module's syntax, and it is all directly defined items plus
|
||||
//! imports. The plain is to make `InputModuleItems` independent of local
|
||||
//! modifications (that is, typing inside a function shold not change IMIs),
|
||||
//! such that the results of name resolution can be preserved unless the module
|
||||
//! structure itself is modified.
|
||||
use std::{
|
||||
sync::Arc,
|
||||
time::Instant,
|
||||
|
Loading…
x
Reference in New Issue
Block a user