summaryrefslogtreecommitdiff
path: root/script/vm/node.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-17 17:44:51 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-17 17:44:51 +0800
commit1abbbdc89bb5511aead3ac8155ae68265b90a6e9 (patch)
tree37458759e015edcf0e9650df0fcb1155978c44ed /script/vm/node.lua
parent09f1cf4e0380437087536ec0d79eddae44a0e569 (diff)
downloadlua-language-server-1abbbdc89bb5511aead3ac8155ae68265b90a6e9.zip
some fix
Diffstat (limited to 'script/vm/node.lua')
-rw-r--r--script/vm/node.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/script/vm/node.lua b/script/vm/node.lua
index 39ed219e..1ff229fa 100644
--- a/script/vm/node.lua
+++ b/script/vm/node.lua
@@ -269,6 +269,17 @@ function mt:removeNode(node)
end
end
+---@param name string
+---@return boolean
+function mt:hasType(name)
+ for _, c in ipairs(self) do
+ if c.type == 'global' and c.cate == 'type' and c.name == name then
+ return true
+ end
+ end
+ return false
+end
+
---@return fun():vm.object
function mt:eachObject()
local i = 0