summaryrefslogtreecommitdiff
path: root/tools/love-api.lua
diff options
context:
space:
mode:
Diffstat (limited to 'tools/love-api.lua')
-rw-r--r--tools/love-api.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/love-api.lua b/tools/love-api.lua
index bb7f6c8e..8117970f 100644
--- a/tools/love-api.lua
+++ b/tools/love-api.lua
@@ -129,7 +129,7 @@ local function buildFunction(func, node)
end
local params = {}
for _, param in ipairs(func.variants[1].arguments or {}) do
- for paramName in param.name:gmatch '[%a_][%w_]+' do
+ for paramName in param.name:gmatch '[%a_][%w_]*' do
params[#params+1] = paramName
text[#text+1] = ('---@param %s %s # %s'):format(
paramName,
@@ -139,7 +139,7 @@ local function buildFunction(func, node)
end
end
for _, rtn in ipairs(func.variants[1].returns or {}) do
- for returnName in rtn.name:gmatch '[%a_][%w_]+' do
+ for returnName in rtn.name:gmatch '[%a_][%w_]*' do
text[#text+1] = ('---@return %s %s # %s'):format(
buildType(rtn),
returnName,