mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Move AstIdMap infra to the span crate
This commit is contained in:
parent
549aae7c07
commit
efd76ecff1
14 changed files with 61 additions and 73 deletions
|
@ -3,10 +3,12 @@ use std::fmt::{self, Write};
|
|||
|
||||
use salsa::InternId;
|
||||
|
||||
mod ast_id;
|
||||
mod hygiene;
|
||||
mod map;
|
||||
|
||||
pub use self::{
|
||||
ast_id::{AstIdMap, AstIdNode, ErasedFileAstId, FileAstId},
|
||||
hygiene::{SyntaxContextData, SyntaxContextId, Transparency},
|
||||
map::{RealSpanMap, SpanMap},
|
||||
};
|
||||
|
@ -26,10 +28,6 @@ pub struct FileRange {
|
|||
pub range: TextRange,
|
||||
}
|
||||
|
||||
/// See crates\hir-expand\src\ast_id_map.rs
|
||||
/// This is a type erased FileAstId.
|
||||
pub type ErasedFileAstId = la_arena::Idx<syntax::SyntaxNodePtr>;
|
||||
|
||||
// The first index is always the root node's AstId
|
||||
/// The root ast id always points to the encompassing file, using this in spans is discouraged as
|
||||
/// any range relative to it will be effectively absolute, ruining the entire point of anchored
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue