summaryrefslogtreecommitdiff
path: root/script/vm/global.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-12-08 18:45:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-12-08 18:45:24 +0800
commitd4e35887aba9ed3794d5694a19b976eed5a68269 (patch)
tree702398520c060615da7bfdf5c1075014d1763262 /script/vm/global.lua
parent9bcc9d55cd511c8e27930e6b1629a4b63bfa79c5 (diff)
downloadlua-language-server-d4e35887aba9ed3794d5694a19b976eed5a68269.zip
cleanup
Diffstat (limited to 'script/vm/global.lua')
-rw-r--r--script/vm/global.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/script/vm/global.lua b/script/vm/global.lua
index 37b54349..64bb0e9a 100644
--- a/script/vm/global.lua
+++ b/script/vm/global.lua
@@ -9,6 +9,7 @@ local vm = require 'vm.vm'
---@class vm.global.link
---@field gets parser.object[]
---@field sets parser.object[]
+---@field hasGet boolean?
---@class vm.global
---@field links table<uri, vm.global.link>
@@ -34,10 +35,11 @@ end
---@param uri uri
---@param source parser.object
function mt:addGet(uri, source)
+ local link = self.links[uri]
if PREVIEW then
+ link.hasGet = true
return
end
- local link = self.links[uri]
if not link.gets then
link.gets = {}
end
@@ -96,6 +98,7 @@ function mt:getAllSets()
return cache
end
+---@async
---@return parser.object[]
function mt:getGets(suri)
if not self.getsCache then