summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-12-01 10:49:34 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-12-01 10:49:34 +0800
commit58815ee05b636efe9330cd26926f4aeb047984a9 (patch)
tree27de6c7971606436048577d9f6b58f9a203d7389 /script
parent8e41f1d067e3ce5f77bc9fe7c03d404da5553c60 (diff)
downloadlua-language-server-58815ee05b636efe9330cd26926f4aeb047984a9.zip
clean up code
Diffstat (limited to 'script')
-rw-r--r--script/parser/guide.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 1b4213b1..54841333 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -1179,12 +1179,9 @@ function m.status(parentStatus, interface, deep)
depth = parentStatus and (parentStatus.depth + 1) or 0,
searchDeep= parentStatus and parentStatus.searchDeep or deep or -999,
interface = parentStatus and parentStatus.interface or {},
- locks = parentStatus and parentStatus.locks or {},
deep = parentStatus and parentStatus.deep,
results = {},
}
- status.lock = status.locks[status.depth] or {}
- status.locks[status.depth] = status.lock
if interface then
for k, v in pairs(interface) do
status.interface[k] = v
@@ -2297,13 +2294,14 @@ function m.searchSameFields(status, simple, mode)
}
end
local max = 0
+ local lock = {}
for i = 1, 1e6 do
local data = queue[i]
if not data then
return
end
- if not status.lock[data.obj] then
- status.lock[data.obj] = true
+ if not lock[data.obj] then
+ lock[data.obj] = true
max = max + 1
status.cache.count = status.cache.count + 1
m.checkSameSimple(status, simple, data, mode, queue)