From da6942640931afd8f39db0fc84e8e0394f95d9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 20 Jul 2021 19:23:03 +0800 Subject: update --- tools/love-api.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools') 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) -- cgit v1.2.3