diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-02-10 18:08:49 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-02-10 18:08:49 +0800 |
commit | 22d57238e59b796804cf27d59e2473266a1d265d (patch) | |
tree | bd7856260e3b378c5e6d158bb7a02254c8536702 /script/vm/state.lua | |
parent | e5f4b3051b23442f5181b4752f951023718ceed6 (diff) | |
download | lua-language-server-22d57238e59b796804cf27d59e2473266a1d265d.zip |
update
Diffstat (limited to 'script/vm/state.lua')
-rw-r--r-- | script/vm/state.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/script/vm/state.lua b/script/vm/state.lua index ba0b6665..44b62684 100644 --- a/script/vm/state.lua +++ b/script/vm/state.lua @@ -13,6 +13,9 @@ m.subscriptions = util.defaultTable(function () } end) +---@param name string +---@param uri uri +---@param source parser.guide.object ---@return vm.node.global function m.declareGlobal(name, uri, source) m.subscriptions[uri].globals[name] = true @@ -21,6 +24,8 @@ function m.declareGlobal(name, uri, source) return node end +---@param name string +---@param uri? uri ---@return vm.node.global function m.getGlobal(name, uri) if uri then @@ -29,6 +34,7 @@ function m.getGlobal(name, uri) return m.globals[name] end +---@param uri uri function m.dropUri(uri) local subscription = m.subscriptions[uri] m.subscriptions[uri] = nil |