diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-15 23:00:35 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-15 23:00:35 +0800 |
commit | 2862282e18315a6474001a994e385fee132753a6 (patch) | |
tree | 9eb13ebf8e14bb882a70bc42110f86f1940008a4 /server-beta | |
parent | afc040fa210cfe5c21b4d92c20604a5c24bec4ca (diff) | |
download | lua-language-server-2862282e18315a6474001a994e385fee132753a6.zip |
修正一些bug
Diffstat (limited to 'server-beta')
-rw-r--r-- | server-beta/src/parser/ast.lua | 5 | ||||
-rw-r--r-- | server-beta/src/searcher/eachRef.lua | 4 |
2 files changed, 8 insertions, 1 deletions
diff --git a/server-beta/src/parser/ast.lua b/server-beta/src/parser/ast.lua index a87d9acc..f3fec01b 100644 --- a/server-beta/src/parser/ast.lua +++ b/server-beta/src/parser/ast.lua @@ -712,6 +712,11 @@ local Defs = { } list[n-1] = exp list[n+1] = exp + local lastN = ops[i+1] + if lastN then + list[lastN-1] = exp + list[lastN+1] = exp + end checkOpVersion(op) end local final = ops[1] diff --git a/server-beta/src/searcher/eachRef.lua b/server-beta/src/searcher/eachRef.lua index a7a86739..743b693e 100644 --- a/server-beta/src/searcher/eachRef.lua +++ b/server-beta/src/searcher/eachRef.lua @@ -134,7 +134,9 @@ local function ofValue(value, callback) or parent.type == 'setlocal' or parent.type == 'setfield' or parent.type == 'setmethod' - or parent.type == 'setindex' then + or parent.type == 'setindex' + or parent.type == 'tablefield' + or parent.type == 'tableindex' then if parent.value == value then searcher.eachRef(parent, callback) end |