diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-20 19:23:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-20 19:23:03 +0800 |
commit | da6942640931afd8f39db0fc84e8e0394f95d9b1 (patch) | |
tree | 9cbb0cfecec8c949b51a9c1fd91c2c9e32754744 /tools | |
parent | 8e3de6b5653ea7087a248b3eb2a4aea6067688b5 (diff) | |
download | lua-language-server-da6942640931afd8f39db0fc84e8e0394f95d9b1.zip |
update
Diffstat (limited to 'tools')
-rw-r--r-- | tools/love-api.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/love-api.lua b/tools/love-api.lua index 6817e9ff..86ed24a6 100644 --- a/tools/love-api.lua +++ b/tools/love-api.lua @@ -23,7 +23,8 @@ local knownTypes = { ['lightuserdata'] = 'lightuserdata', ['thread'] = 'thread', ['cdata'] = 'ffi.cdata*', - ['light userdata'] = 'lightuserdata' + ['light userdata'] = 'lightuserdata', + ['Variant'] = 'any', } local function trim(name) @@ -133,7 +134,10 @@ local function buildFile(class, defs) text[#text+1] = '---@meta' text[#text+1] = '' - text[#text+1] = ('-- version: %s'):format(defs.version) + if defs.version then + text[#text+1] = ('-- version: %s'):format(defs.version) + end + text[#text+1] = buildDescription(defs.description) text[#text+1] = ('---@class %s'):format(class) text[#text+1] = ('%s = {}'):format(class) |