summaryrefslogtreecommitdiff
path: root/script-beta/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-23 17:37:58 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-23 17:37:58 +0800
commitd42b1d9427b186470ff571b67cf0d1397c3f30cd (patch)
tree369090cc2d5d3306b4490c7ffc9828c83fbaf7c3 /script-beta/parser
parentdb2b91b69613f682031459721e2c6f5d710571a6 (diff)
downloadlua-language-server-d42b1d9427b186470ff571b67cf0d1397c3f30cd.zip
更新诊断
Diffstat (limited to 'script-beta/parser')
-rw-r--r--script-beta/parser/luadoc.lua9
1 files changed, 5 insertions, 4 deletions
diff --git a/script-beta/parser/luadoc.lua b/script-beta/parser/luadoc.lua
index 88521a8b..9c9ea113 100644
--- a/script-beta/parser/luadoc.lua
+++ b/script-beta/parser/luadoc.lua
@@ -686,16 +686,17 @@ local function bindDoc(state, lns, binded)
if not lastDoc then
return
end
+ local bindSources = {}
+ for _, doc in ipairs(binded) do
+ doc.bindGroup = binded
+ doc.bindSources = bindSources
+ end
local row = guide.positionOf(lns, lastDoc.start)
local start, finish = guide.lineRange(lns, row + 1)
if start >= finish then
-- 空行
return
end
- local bindSources = {}
- for _, doc in ipairs(binded) do
- doc.bindSources = bindSources
- end
guide.eachSourceBetween(state.ast, start, finish, function (src)
if src.type == 'local'
or src.type == 'setlocal'