diff options
Diffstat (limited to 'script/vm/global.lua')
-rw-r--r-- | script/vm/global.lua | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/script/vm/global.lua b/script/vm/global.lua index d5974e63..2f17bdc2 100644 --- a/script/vm/global.lua +++ b/script/vm/global.lua @@ -8,6 +8,7 @@ local util = require 'utility' ---@field links table<uri, vm.node.global.link> ---@field setsCache parser.object[] ---@field getsCache parser.object[] +---@field cate vm.global.cate local mt = {} mt.__index = mt mt.type = 'global' @@ -70,10 +71,12 @@ function mt:isAlive() return next(self.links) ~= nil end +---@param cate vm.global.cate ---@return vm.node.global -return function (name) +return function (name, cate) return setmetatable({ name = name, + cate = cate, links = util.defaultTable(function () return { sets = {}, |