diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-17 23:37:01 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-17 23:37:01 +0800 |
commit | e8ea5f90e60e36833b3e2d98e66d89e6098faacc (patch) | |
tree | 7526305acc1f65c5ab818bcae99896b0e9b5d8cf /server-beta/src/searcher | |
parent | 0805814ac575b0f610c4831548cb7f74b39ee37c (diff) | |
download | lua-language-server-e8ea5f90e60e36833b3e2d98e66d89e6098faacc.zip |
修正一些bug
Diffstat (limited to 'server-beta/src/searcher')
-rw-r--r-- | server-beta/src/searcher/eachRef.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/server-beta/src/searcher/eachRef.lua b/server-beta/src/searcher/eachRef.lua index eb6fc992..24f2ea77 100644 --- a/server-beta/src/searcher/eachRef.lua +++ b/server-beta/src/searcher/eachRef.lua @@ -321,7 +321,8 @@ end local function ofField(source, callback) local parent = source.parent local key = guide.getKeyName(source) - if parent.type == 'tablefield' then + if parent.type == 'tablefield' + or parent.type == 'tableindex' then local tbl = parent.parent searcher.eachField(tbl, function (info) if key == info.key then @@ -356,7 +357,8 @@ local function ofLiteral(source, callback) return end if parent.type == 'setindex' - or parent.type == 'getindex' then + or parent.type == 'getindex' + or parent.type == 'tableindex' then ofField(source, callback) end end @@ -422,8 +424,7 @@ local function eachRef(source, callback) or stype == 'getglobal' then ofGlobal(source, callback) elseif stype == 'field' - or stype == 'method' - or stype == 'index' then + or stype == 'method' then ofField(source, callback) elseif stype == 'setfield' or stype == 'getfield' |