summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-16 21:21:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-16 21:21:08 +0800
commitcd6b80d6126a785c4407e118c13388db537d6bf3 (patch)
treefd67b86a87f55abd5ea303153e77ed87c671e3e0 /script/parser
parent753841914bed1f0b3fcc990acb28b2f657bd8b85 (diff)
downloadlua-language-server-cd6b80d6126a785c4407e118c13388db537d6bf3.zip
split `doc.class` and `doc.type`
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/luadoc.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 1d8d7c42..b46c81d9 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -1310,6 +1310,16 @@ local function isNextLine(binded, doc)
return false
end
local lastDoc = binded[#binded]
+ if lastDoc.type == 'doc.type' then
+ return false
+ end
+ if lastDoc.type == 'doc.class'
+ or lastDoc.type == 'doc.field' then
+ if doc.type ~= 'doc.field'
+ and doc.type ~= 'doc.comment' then
+ return false
+ end
+ end
local lastRow = guide.rowColOf(lastDoc.finish)
local newRow = guide.rowColOf(doc.start)
return newRow - lastRow == 1