diff options
-rw-r--r-- | script/parser/luadoc.lua | 10 |
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 |