summaryrefslogtreecommitdiff
path: root/script/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-28 21:15:25 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-28 21:15:25 +0800
commitdc8d3adcd83a8d9bc33b8b783fce3f2ad76be917 (patch)
tree13bf0ff0039a958dddb601d899a26d353a66bb33 /script/parser
parenta525372a28c87e6e759ae502aca3b1573a35155a (diff)
downloadlua-language-server-dc8d3adcd83a8d9bc33b8b783fce3f2ad76be917.zip
fix
Diffstat (limited to 'script/parser')
-rw-r--r--script/parser/luadoc.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index af177223..1e7a6ab3 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -944,9 +944,13 @@ local docSwitch = util.switch()
nextToken()
docType.optional = true
end
- docType.name = dots
- or parseName('doc.return.name', docType)
- or parseDots('doc.return.name', docType)
+ if dots then
+ docType.name = dots
+ dots.parent = docType
+ else
+ docType.name = parseName('doc.return.name', docType)
+ or parseDots('doc.return.name', docType)
+ end
result.returns[#result.returns+1] = docType
if not checkToken('symbol', ',', 1) then
break