From 2862282e18315a6474001a994e385fee132753a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 15 Nov 2019 23:00:35 +0800 Subject: =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E4=B8=80=E4=BA=9Bbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-beta/src/parser/ast.lua | 5 +++++ server-beta/src/searcher/eachRef.lua | 4 +++- 2 files changed, 8 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3