Cache parse trees in Semantics

This commit is contained in:
Lukas Wirth 2024-06-04 15:21:22 +02:00
parent c12f093716
commit 7d40763c88
3 changed files with 22 additions and 4 deletions

View file

@ -405,6 +405,7 @@ impl SourceToDefCtx<'_, '_> {
}
pub(super) fn find_container(&mut self, src: InFile<&SyntaxNode>) -> Option<ChildContainer> {
let _p = tracing::span!(tracing::Level::INFO, "find_container").entered();
let def =
self.ancestors_with_macros(src, |this, container| this.container_to_def(container));
if let Some(def) = def {