diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-28 20:56:57 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-28 20:56:57 +0800 |
commit | 5b45dfffe0a6b124873dbf278bce7987fabc36aa (patch) | |
tree | 77b1a00b64793034c581f02f597dccaa9b35ccca /server-beta/src/searcher/init.lua | |
parent | 803febe4956557dba464c66625e6c67868fa0b18 (diff) | |
download | lua-language-server-5b45dfffe0a6b124873dbf278bce7987fabc36aa.zip |
支持 rawset
Diffstat (limited to 'server-beta/src/searcher/init.lua')
-rw-r--r-- | server-beta/src/searcher/init.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/server-beta/src/searcher/init.lua b/server-beta/src/searcher/init.lua index 5360a1e2..66a15f54 100644 --- a/server-beta/src/searcher/init.lua +++ b/server-beta/src/searcher/init.lua @@ -97,8 +97,7 @@ function mt:getSpecialName(source) end return nil end - local function getName(info) - local src = info.source + local function getName(src) if src.type == 'getglobal' then local node = src.node if node.tag ~= '_ENV' then @@ -123,7 +122,12 @@ function mt:getSpecialName(source) end end end - self:eachRef(source, getName) + getName(source) + if not spName then + self:eachRef(source, function (info) + getName(info.source) + end) + end self.cache.specialName[source] = spName or false return spName end |