From 22d57238e59b796804cf27d59e2473266a1d265d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Thu, 10 Feb 2022 18:08:49 +0800 Subject: update --- script/vm/state.lua | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'script/vm/state.lua') 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 -- cgit v1.2.3