diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-05-30 03:54:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 03:54:55 +0800 |
commit | 0595b9d52f83512f06aa80a90b09159863e3f2b7 (patch) | |
tree | cb9d12abc884526f9d72bf142beb32e00c3ef160 /tools/love-api.lua | |
parent | 9a833e6996edbb3d0a634f20ee52afda1576c2f5 (diff) | |
parent | 86d70a42239f6a3dcd6e638c53b805c5052bdc57 (diff) | |
download | lua-language-server-0595b9d52f83512f06aa80a90b09159863e3f2b7.zip |
Merge pull request #1183 from sewbacca/master
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 c5f40288..d72bc5c8 100644 --- a/tools/love-api.lua +++ b/tools/love-api.lua @@ -169,6 +169,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 |