summaryrefslogtreecommitdiff
path: root/script/vm/state.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/vm/state.lua')
-rw-r--r--script/vm/state.lua6
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