diff options
author | Sewbacca <sewbacca@live.de> | 2022-05-29 20:26:25 +0200 |
---|---|---|
committer | Sewbacca <sewbacca@live.de> | 2022-05-29 20:26:25 +0200 |
commit | 86d70a42239f6a3dcd6e638c53b805c5052bdc57 (patch) | |
tree | 9bc035299eedf095d6ce7ea393a41d47f17d50fa /tools/love-api.lua | |
parent | 7eaec047d708e84a7c29dd9d70e306d90fac412d (diff) | |
download | lua-language-server-86d70a42239f6a3dcd6e638c53b805c5052bdc57.zip |
Added vararg support
Diffstat (limited to 'tools/love-api.lua')
-rw-r--r-- | tools/love-api.lua | 8 |
1 files changed, 8 insertions, 0 deletions
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 |