mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-01 06:11:43 +00:00
red-knot: source_text
, line_index
, and parsed_module
queries (#11822)
This commit is contained in:
parent
efbf7b14b5
commit
d4dd96d1f4
9 changed files with 194 additions and 16 deletions
|
@ -4,15 +4,19 @@ use rustc_hash::FxHasher;
|
|||
use salsa::DbWithJar;
|
||||
|
||||
use crate::file_system::{FileSystem, FileSystemPath};
|
||||
use crate::parsed::parsed_module;
|
||||
use crate::source::{line_index, source_text};
|
||||
use crate::vfs::{VendoredPath, Vfs, VfsFile};
|
||||
|
||||
pub mod file_system;
|
||||
pub mod parsed;
|
||||
pub mod source;
|
||||
pub mod vfs;
|
||||
|
||||
pub(crate) type FxDashMap<K, V> = dashmap::DashMap<K, V, BuildHasherDefault<FxHasher>>;
|
||||
|
||||
#[salsa::jar(db=Db)]
|
||||
pub struct Jar(VfsFile);
|
||||
pub struct Jar(VfsFile, source_text, line_index, parsed_module);
|
||||
|
||||
/// Database that gives access to the virtual filesystem, source code, and parsed AST.
|
||||
pub trait Db: DbWithJar<Jar> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue