From 6b7b3a89c8ef0640571ebe9324ea4e43ffbfff33 Mon Sep 17 00:00:00 2001 From: sumneko Date: Sat, 5 Mar 2022 20:23:52 +0800 Subject: generic --- script/parser/guide.lua | 1 - script/parser/luadoc.lua | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'script/parser') diff --git a/script/parser/guide.lua b/script/parser/guide.lua index e877ddce..831534a7 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -28,7 +28,6 @@ local type = type ---@field extends parser.object[] ---@field types parser.object[] ---@field fields parser.object[] ----@field typeGeneric table ---@field tkey parser.object ---@field tvalue parser.object ---@field tindex integer diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index a47ebe34..5bc566f2 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -1263,7 +1263,7 @@ local function bindGeneric(binded) if doc.type == 'doc.generic' then for _, obj in ipairs(doc.generics) do local name = obj.generic[1] - generics[name] = {} + generics[name] = true end elseif doc.type == 'doc.param' or doc.type == 'doc.return' @@ -1271,8 +1271,7 @@ local function bindGeneric(binded) guide.eachSourceType(doc, 'doc.type.name', function (src) local name = src[1] if generics[name] then - generics[name][#generics[name]+1] = src - src.typeGeneric = generics + src.type = 'doc.generic.name' end end) end -- cgit v1.2.3