From 86d70a42239f6a3dcd6e638c53b805c5052bdc57 Mon Sep 17 00:00:00 2001 From: Sewbacca Date: Sun, 29 May 2022 20:26:25 +0200 Subject: Added vararg support --- tools/love-api.lua | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/love-api.lua') diff --git a/tools/love-api.lua b/tools/love-api.lua index 31284cd6..74866962 100644 --- a/tools/love-api.lua +++ b/tools/love-api.lua @@ -167,6 +167,14 @@ local function buildFunction(func, node, typeName) param.description ) end + + if param.name == "..." then + params[#params+1] = param.name + text[#text+1] = ('---@vararg %s # %s'):format( + buildType(param), + param.description + ) + end end for _, rtn in ipairs(func.variants[1].returns or {}) do for returnName in rtn.name:gmatch '[%a_][%w_]*' do -- cgit v1.2.3