summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/table.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-29 20:17:39 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-29 20:17:39 +0800
commite98483d89ac38463cf5b717a3b19861baf8f3e94 (patch)
treea250d58d95a1eac28334ba40e888f08e4e47e83a /script-beta/core/hover/table.lua
parent0ad52ca53a9e9d24ee9a3451e24ce68f8bee0ff9 (diff)
downloadlua-language-server-e98483d89ac38463cf5b717a3b19861baf8f3e94.zip
整理代码
Diffstat (limited to 'script-beta/core/hover/table.lua')
-rw-r--r--script-beta/core/hover/table.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/script-beta/core/hover/table.lua b/script-beta/core/hover/table.lua
index 314d0b42..d5761e17 100644
--- a/script-beta/core/hover/table.lua
+++ b/script-beta/core/hover/table.lua
@@ -172,10 +172,10 @@ end
return function (source)
local literals = {}
local classes = {}
- vm.eachField(source, function (src)
+ for _, src in ipairs(vm.getFields(source, 'deep')) do
local key = getKey(src)
if not key then
- return
+ goto CONTINUE
end
local class, literal = getField(src)
if not classes[key] then
@@ -186,7 +186,8 @@ return function (source)
end
classes[key][#classes[key]+1] = class
literals[key][#literals[key]+1] = literal
- end)
+ ::CONTINUE::
+ end
clearClasses(classes)