From 1ab2eddb46db153d6793dd6629a4b32092eea94c Mon Sep 17 00:00:00 2001 From: Yann Hamdaoui Date: Tue, 28 Jan 2025 16:17:27 +0100 Subject: [PATCH] [WIP] Properly apply import resolution --- core/src/cache.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/cache.rs b/core/src/cache.rs index 45d2688e2d..c979534f19 100644 --- a/core/src/cache.rs +++ b/core/src/cache.rs @@ -135,6 +135,7 @@ impl TermCache { .map(|TermEntry { state, .. }| std::mem::replace(state, new)) } + /// Applies term transformation excepted import resolution, implemented as a differeent phase. fn transform( &mut self, wildcards: &WildcardsCache, @@ -1199,7 +1200,7 @@ impl Caches { /// It only accumulates errors if the cache is in error tolerant mode, otherwise it returns an /// `Err(..)` containing a `CacheError`. #[allow(clippy::type_complexity)] - pub fn resolve_imports( + fn resolve_imports( &mut self, file_id: FileId, ) -> Result, Vec)>, CacheError> { @@ -1379,6 +1380,12 @@ impl Caches { term, ) } + + fn all_transformations(&mut self, file_id: FileId) -> Result<(), ()> { + //TODO: finish this + self.resolve_imports(file_id); + self.terms.transform(); + } } /// The error tolerance mode used by the parser. The NLS needs to try to