diff options
author | C3pa <41503714+C3pa@users.noreply.github.com> | 2022-05-28 16:48:06 +0200 |
---|---|---|
committer | C3pa <41503714+C3pa@users.noreply.github.com> | 2022-05-28 16:48:06 +0200 |
commit | 6803eb57592e12662363eb6ebd0341e0043cfa8f (patch) | |
tree | af06efb22778e69561dbc48ca7d588b6cabb5009 /tools/love-api.lua | |
parent | ac4d8bc13c691e275c413055c89f373c594b57dd (diff) | |
download | lua-language-server-6803eb57592e12662363eb6ebd0341e0043cfa8f.zip |
Add ~= nil check
Diffstat (limited to 'tools/love-api.lua')
-rw-r--r-- | tools/love-api.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/love-api.lua b/tools/love-api.lua index aae38694..38653e68 100644 --- a/tools/love-api.lua +++ b/tools/love-api.lua @@ -156,7 +156,7 @@ local function buildFunction(func, node, typeName) for _, param in ipairs(func.variants[1].arguments or {}) do for paramName in param.name:gmatch '[%a_][%w_]*' do params[#params+1] = paramName - local optional = param.type == 'table' and isTableOptional(param.table) or param.default + local optional = param.type == 'table' and isTableOptional(param.table) or (param.default ~= nil) text[#text+1] = ('---@param %s%s %s # %s'):format( paramName, optional and '?' or '', |