summaryrefslogtreecommitdiff
path: root/tools/love-api.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-10-25 16:44:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-10-25 16:44:08 +0800
commit8ced2703cc4598fe880cf27f2f82a90e947b532f (patch)
tree0e4c8e0de8128d5fcccb217581a907170256d01a /tools/love-api.lua
parent916bec18c8384f14404b2b79d762855d1610411a (diff)
downloadlua-language-server-8ced2703cc4598fe880cf27f2f82a90e947b532f.zip
update love2d-api
Diffstat (limited to 'tools/love-api.lua')
-rw-r--r--tools/love-api.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/love-api.lua b/tools/love-api.lua
index 8117970f..32ded033 100644
--- a/tools/love-api.lua
+++ b/tools/love-api.lua
@@ -131,8 +131,9 @@ local function buildFunction(func, node)
for _, param in ipairs(func.variants[1].arguments or {}) do
for paramName in param.name:gmatch '[%a_][%w_]*' do
params[#params+1] = paramName
- text[#text+1] = ('---@param %s %s # %s'):format(
+ text[#text+1] = ('---@param %s%s %s # %s'):format(
paramName,
+ param.default == nil and '' or '?',
buildType(param),
param.description
)