diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-04-09 22:19:08 +0200 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-04-09 22:19:08 +0200 |
| commit | 144d2b3e36d3dca77b8531dc0136ba084b530d54 (patch) | |
| tree | a06cfd4d76baa4cd64f77379e7ee9920e93371ae /src/server/caches.odin | |
| parent | 4d0d079b4b79ce5730d8c2ee8694652a3f73049f (diff) | |
Merge packages
Diffstat (limited to 'src/server/caches.odin')
| -rw-r--r-- | src/server/caches.odin | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/server/caches.odin b/src/server/caches.odin index cc993c3..42dbc27 100644 --- a/src/server/caches.odin +++ b/src/server/caches.odin @@ -1,19 +1,17 @@ package server -import "shared:index" -import "shared:analysis" 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.SymbolAndNode, + files: map[string]map[uintptr]SymbolAndNode, } file_resolve_cache: FileResolveCache -resolve_entire_file :: proc(document: ^common.Document) -> map[uintptr]index.SymbolAndNode{ +resolve_entire_file_cached :: proc(document: ^common.Document) -> map[uintptr]SymbolAndNode{ if document.uri.uri not_in file_resolve_cache.files { - file_resolve_cache.files[document.uri.uri] = analysis.resolve_entire_file( + file_resolve_cache.files[document.uri.uri] = resolve_entire_file( document, common.scratch_allocator(document.allocator), ) |