aboutsummaryrefslogtreecommitdiff
path: root/src/server/caches.odin
diff options
context:
space:
mode:
authorDaniel Gavin <danielgavin5@hotmail.com>2022-03-19 20:44:29 +0100
committerDaniel Gavin <danielgavin5@hotmail.com>2022-03-19 20:44:29 +0100
commitedcf80026173f9d20ca2df6f574640302bed4bdf (patch)
tree0954d648e812151403ce133f5b956219d455a3cb /src/server/caches.odin
parent06b76ac1ee9d8f607d944ce9757ebe40adefcf2a (diff)
Prepare for rename
Diffstat (limited to 'src/server/caches.odin')
-rw-r--r--src/server/caches.odin6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/server/caches.odin b/src/server/caches.odin
index 2bb4b7f..cc993c3 100644
--- a/src/server/caches.odin
+++ b/src/server/caches.odin
@@ -6,16 +6,18 @@ import "shared:common"
//Used in semantic tokens and inlay hints to handle the entire file being resolved.
FileResolveCache :: struct {
- files: map[string]map[uintptr]index.Symbol,
+ files: map[string]map[uintptr]index.SymbolAndNode,
}
file_resolve_cache: FileResolveCache
-resolve_entire_file :: proc(document: ^common.Document) {
+resolve_entire_file :: proc(document: ^common.Document) -> map[uintptr]index.SymbolAndNode{
if document.uri.uri not_in file_resolve_cache.files {
file_resolve_cache.files[document.uri.uri] = analysis.resolve_entire_file(
document,
common.scratch_allocator(document.allocator),
)
}
+
+ return file_resolve_cache.files[document.uri.uri];
}