diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-25 01:23:50 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-25 01:23:50 +0800 |
commit | 125d943a7faec97b7169d0088a12ba6a44a14c16 (patch) | |
tree | 40b5a7d8d55571334c5ddecd302fe89c34969c84 /script/vm/node.lua | |
parent | 163da759468164bc020fb4801bf06f1a190af7ad (diff) | |
download | lua-language-server-125d943a7faec97b7169d0088a12ba6a44a14c16.zip |
add `---@cast`
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r-- | script/vm/node.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua index 3d1a24bc..8b2bafd7 100644 --- a/script/vm/node.lua +++ b/script/vm/node.lua @@ -204,6 +204,15 @@ function mt:remove(name) end end +---@param node vm.node +function mt:removeNode(node) + for _, c in ipairs(node) do + if c.type == 'global' and c.cate == 'type' then + self:remove(c.name) + end + end +end + ---@return fun():vm.object function mt:eachObject() local i = 0 |