diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-10-29 20:17:39 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-10-29 20:17:39 +0800 |
commit | e98483d89ac38463cf5b717a3b19861baf8f3e94 (patch) | |
tree | a250d58d95a1eac28334ba40e888f08e4e47e83a /script-beta/core/hover/table.lua | |
parent | 0ad52ca53a9e9d24ee9a3451e24ce68f8bee0ff9 (diff) | |
download | lua-language-server-e98483d89ac38463cf5b717a3b19861baf8f3e94.zip |
整理代码
Diffstat (limited to 'script-beta/core/hover/table.lua')
-rw-r--r-- | script-beta/core/hover/table.lua | 7 |
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) |