summaryrefslogtreecommitdiff
path: root/script/parser/luadoc.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-29 15:47:21 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-29 15:47:21 +0800
commit6c452f5c36417289f5030074ce4834783e56d06f (patch)
treed5c19f7f5dcba99eb19eae730d5d8ac7e91503bc /script/parser/luadoc.lua
parent990596122167d4fa5bdc113f10d05027bb3a6bdf (diff)
downloadlua-language-server-6c452f5c36417289f5030074ce4834783e56d06f.zip
stash
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r--script/parser/luadoc.lua8
1 files changed, 3 insertions, 5 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index a7062862..5b34b11e 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -1344,7 +1344,7 @@ local function bindDoc(sources, lns, binded)
bindClassAndFields(binded)
end
-local bindDocAccept = util.arrayToHash {
+local bindDocAccept = {
'local' , 'setlocal' , 'setglobal',
'setfield' , 'setmethod' , 'setindex' ,
'tablefield', 'tableindex',
@@ -1355,10 +1355,8 @@ local function bindDocs(state)
tracy.ZoneBeginN('bindDocs #1')
local text = state.lua
local sources = {}
- guide.eachSource(state.ast, function (src)
- if bindDocAccept[src.type] then
- sources[#sources+1] = src
- end
+ guide.eachSourceTypes(state.ast, bindDocAccept, function (src)
+ sources[#sources+1] = src
end)
tracy.ZoneEnd()
tracy.ZoneBeginN('bindDocs #2')