summaryrefslogtreecommitdiff
path: root/script-beta/vm/getClass.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-29 23:32:46 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-29 23:32:46 +0800
commit705e882703b837e44b1c6689d1fd90c7778f2c0f (patch)
tree85c30f28b7ad5b4d05ecad645fbb61da6528811a /script-beta/vm/getClass.lua
parente1ad0d2693911f3f7693e4b00d426322a29d02de (diff)
downloadlua-language-server-705e882703b837e44b1c6689d1fd90c7778f2c0f.zip
整理代码
Diffstat (limited to 'script-beta/vm/getClass.lua')
-rw-r--r--script-beta/vm/getClass.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/script-beta/vm/getClass.lua b/script-beta/vm/getClass.lua
index 2a507b12..1948922d 100644
--- a/script-beta/vm/getClass.lua
+++ b/script-beta/vm/getClass.lua
@@ -35,10 +35,10 @@ local function getClass(source, classes, depth, deep)
classes[#classes+1] = value[1]
end
else
- vm.eachField(value, function (src)
+ for _, src in ipairs(vm.getFields(value)) do
local key = vm.getKeyName(src)
if not key then
- return
+ goto CONTINUE
end
local lkey = key:lower()
if lkey == 's|type'
@@ -50,7 +50,8 @@ local function getClass(source, classes, depth, deep)
classes[#classes+1] = value[1]
end
end
- end)
+ ::CONTINUE::
+ end
end
if #classes ~= 0 then
return