summaryrefslogtreecommitdiff
path: root/script/parser/luadoc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r--script/parser/luadoc.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua
index 6adbfa68..f9cd3db0 100644
--- a/script/parser/luadoc.lua
+++ b/script/parser/luadoc.lua
@@ -598,6 +598,16 @@ local function parseBoolean(parent)
return boolean
end
+local function parseParen(parent)
+ if not checkToken('symbol', '(', 1) then
+ return
+ end
+ nextToken()
+ local tp = parseType(parent)
+ nextSymbolOrError(')')
+ return tp
+end
+
function parseTypeUnit(parent)
local result = parseFunction(parent)
or parseTable(parent)
@@ -605,6 +615,7 @@ function parseTypeUnit(parent)
or parseInteger(parent)
or parseBoolean(parent)
or parseDots('doc.type.name', parent)
+ or parseParen(parent)
if not result then
local literal = checkToken('symbol', '`', 1)
if literal then