diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2018-12-10 15:05:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2018-12-10 15:05:16 +0800 |
commit | 8e6091ef4cfe560d085401540ddd1cb33183ef29 (patch) | |
tree | 49c66010951af513889ad6645bafccda30f5bec7 /server/src/matcher/find_lib.lua | |
parent | 03651e86bd8a240317cf081a0d0c05dac64f1165 (diff) | |
download | lua-language-server-8e6091ef4cfe560d085401540ddd1cb33183ef29.zip |
根据全局lib推断
Diffstat (limited to 'server/src/matcher/find_lib.lua')
-rw-r--r-- | server/src/matcher/find_lib.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/src/matcher/find_lib.lua b/server/src/matcher/find_lib.lua index 090859db..79cc05f9 100644 --- a/server/src/matcher/find_lib.lua +++ b/server/src/matcher/find_lib.lua @@ -1,4 +1,4 @@ -local libs = require 'matcher.library' +local library = require 'matcher.library' local function isGlobal(var) if var.type ~= 'field' then @@ -105,7 +105,7 @@ end local function findLib(var) local value = var.value or var - for libname, info in pairs(libs.global) do + for libname, info in pairs(library.global) do local fullKey = checkSource(value, libname, info.lib) if fullKey then return info.lib, fullKey, false @@ -117,7 +117,7 @@ local function findLib(var) end end end - for libname, info in pairs(libs.library) do + for libname, info in pairs(library.library) do local fullKey = checkSource(value, libname, info.lib) if fullKey then return info.lib, fullKey, false @@ -129,7 +129,7 @@ local function findLib(var) end end end - for libname, info in pairs(libs.object) do + for libname, info in pairs(library.object) do local fullKey = checkSource(value, libname, info.lib) if fullKey then return info.lib, fullKey, false |