diff options
Diffstat (limited to 'script/vm')
-rw-r--r-- | script/vm/infer.lua | 3 | ||||
-rw-r--r-- | script/vm/node.lua | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/script/vm/infer.lua b/script/vm/infer.lua index e0ab90bb..f7ff2569 100644 --- a/script/vm/infer.lua +++ b/script/vm/infer.lua @@ -173,6 +173,9 @@ local viewNodeSwitch = util.switch() return ('fun(%s)%s'):format(argView, regView) end) +---@class vm.node +---@field lastInfer? vm.infer + ---@param source parser.object | vm.node ---@return vm.infer function vm.getInfer(source) diff --git a/script/vm/node.lua b/script/vm/node.lua index 26f8e761..9433733e 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -14,7 +14,6 @@ mt.__index = mt mt.id = 0 mt.type = 'vm.node' mt.optional = nil -mt.lastInfer = nil mt.data = nil ---@param node vm.node | vm.object @@ -310,6 +309,7 @@ function vm.setNode(source, node, cover) error('Can not set node to global') end if cover then + ---@cast node vm.node vm.nodeCache[source] = node return end |