diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-10-21 15:00:23 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-10-21 15:00:23 +0800 |
commit | 7e1f7304019bb9c8a9e1d7cefdddbcf43e3871f5 (patch) | |
tree | ec067b929ac44774a0adc736c38529d4e582689a | |
parent | a3c1a592e0f0c8b436e489bf9f739ba5bd59ca8e (diff) | |
download | lua-language-server-7e1f7304019bb9c8a9e1d7cefdddbcf43e3871f5.zip |
一些优化
-rw-r--r-- | script-beta/parser/guide.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index ac9c1ac1..e4b58c56 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -1681,7 +1681,10 @@ function m.searchSameFieldsInValue(status, ref, start, queue, mode) force = true, } -- 检查形如 a = f() 的分支情况 - m.checkSameSimpleInCall(status, value, start, queue, mode) + if mode ~= 'field' + and not status.simple then + m.checkSameSimpleInCall(status, value, start, queue, mode) + end -- 检查自己是字面量表的情况 --m.checkSameSimpleInValueOfTable(status, value, start, queue) end @@ -2181,7 +2184,7 @@ function m.searchRefs(status, obj, mode) end end -- 检查simple - if status.depth <= 5 then + if status.depth <= 10 then local simple = m.getSimple(obj) if simple then m.searchSameFields(status, simple, mode) @@ -2190,10 +2193,11 @@ function m.searchRefs(status, obj, mode) if m.debugMode then error('status.depth overflow') elseif DEVELOP then - log.warn(debug.traceback('status.depth overflow')) + --log.warn(debug.traceback('status.depth overflow')) + log.warn('status.depth overflow') end end - + status.depth = status.depth - 1 m.cleanResults(status.results) |