summaryrefslogtreecommitdiff
path: root/script-beta/core/semantic-tokens.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-29 20:08:00 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-29 20:08:00 +0800
commit0ad52ca53a9e9d24ee9a3451e24ce68f8bee0ff9 (patch)
treeb80ad14b67a19f7a27a7332ec9d1b23d4e8aea64 /script-beta/core/semantic-tokens.lua
parent7981076619717ec1cd5c811762f4c60a445f3c8d (diff)
downloadlua-language-server-0ad52ca53a9e9d24ee9a3451e24ce68f8bee0ff9.zip
整理代码
Diffstat (limited to 'script-beta/core/semantic-tokens.lua')
-rw-r--r--script-beta/core/semantic-tokens.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/script-beta/core/semantic-tokens.lua b/script-beta/core/semantic-tokens.lua
index 222f54b6..fa037610 100644
--- a/script-beta/core/semantic-tokens.lua
+++ b/script-beta/core/semantic-tokens.lua
@@ -15,7 +15,7 @@ Care['setglobal'] = function (source, results)
}
end
Care['getglobal'] = function (source, results)
- local lib = vm.getLibrary(source, 'simple')
+ local lib = vm.getLibrary(source)
if lib then
if source[1] == '_G' then
return
@@ -67,7 +67,7 @@ Care['getlocal'] = function (source, results)
end
-- 3. 不是函数的局部变量
local hasFunc
- for _, def in ipairs(vm.getDefs(loc, 'simple')) do
+ for _, def in ipairs(vm.getDefs(loc)) do
if def.type == 'function'
or (def.type == 'library' and def.value.type == 'function') then
hasFunc = true