From dc8d3adcd83a8d9bc33b8b783fce3f2ad76be917 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 28 Jun 2022 21:15:25 +0800 Subject: fix --- script/parser/luadoc.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'script') 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 -- cgit v1.2.3