summaryrefslogtreecommitdiff
path: root/script/parser/luadoc.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-24 19:02:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-24 19:02:09 +0800
commit10ef09e0c3b553fa40845499ef7038b8e7574a01 (patch)
treec03d2500fd035f04639122912ce968bcf20c6c34 /script/parser/luadoc.lua
parent437bb61d0daf663a3eee894946f47bc550c39e52 (diff)
downloadlua-language-server-10ef09e0c3b553fa40845499ef7038b8e7574a01.zip
less bind
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r--script/parser/luadoc.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 56da32f2..1645487d 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -1250,8 +1250,16 @@ local function bindDocsBetween(sources, binded, bindSources, start, finish)
break
end
if src.start >= start then
- src.bindDocs = binded
- bindSources[#bindSources+1] = src
+ if src.type == 'local'
+ or src.type == 'setglobal'
+ or src.type == 'tablefield'
+ or src.type == 'tableindex'
+ or src.type == 'setfield'
+ or src.type == 'setindex'
+ or src.type == 'function' then
+ src.bindDocs = binded
+ bindSources[#bindSources+1] = src
+ end
end
end
end