diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-12 15:25:19 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-12 15:25:19 +0800 |
commit | 1b54dfc2def587eb158dd24c7baa2f60ffb95cde (patch) | |
tree | bbec22ad646d1ba016740adf6f2872f6426a8358 /script | |
parent | 9828b5e6e0c513dc20f756db1350aa6e38faa5b7 (diff) | |
download | lua-language-server-1b54dfc2def587eb158dd24c7baa2f60ffb95cde.zip |
dont search beSet in set
Diffstat (limited to 'script')
-rw-r--r-- | script/parser/guide.lua | 5 | ||||
-rw-r--r-- | script/provider/provider.lua | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index 81adf890..377b2823 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -2404,6 +2404,7 @@ function m.searchSameFieldsInValue(status, ref, start, pushQueue, mode) if not m.checkValueMark(status, ref, value) then --return end + status.share.inSetValue = (status.share.inSetValue or 0) + 1 if not status.share.tempValueMark then status.share.tempValueMark = {} end @@ -2417,6 +2418,7 @@ function m.searchSameFieldsInValue(status, ref, start, pushQueue, mode) end pushQueue(value, start, true) end + status.share.inSetValue = (status.share.inSetValue or 0) - 1 -- 检查形如 a = f() 的分支情况 m.checkSameSimpleInCall(status, value, start, pushQueue, mode) end @@ -2475,6 +2477,9 @@ function m.checkSameSimpleAsSetValue(status, ref, start, pushQueue) if not status.deep then --return end + if status.share.inSetValue and status.share.inSetValue > 0 then + return + end if ref.type == 'select' then return end diff --git a/script/provider/provider.lua b/script/provider/provider.lua index bfd51416..66031f15 100644 --- a/script/provider/provider.lua +++ b/script/provider/provider.lua @@ -271,7 +271,7 @@ proto.on('textDocument/didChange', function (params) if not files.isLua(uri) and not files.isOpen(uri) then return end - log.debug('changes', util.dump(changes)) + --log.debug('changes', util.dump(changes)) local text = tm(uri, changes) files.setText(uri, text, true) end) |