summaryrefslogtreecommitdiff
path: root/tools/love-api.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-10-25 16:42:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-10-25 16:42:28 +0800
commit916bec18c8384f14404b2b79d762855d1610411a (patch)
treeaba18bd0608c1a04a0f949514b5df1ef3c5206fe /tools/love-api.lua
parentf1b65e183ac8d7d7b07e0ae8c2450091989ce10f (diff)
downloadlua-language-server-916bec18c8384f14404b2b79d762855d1610411a.zip
fix #756
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,