From 3932717d816bfc4f98cd9640daca51fb6f2afe8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 9 Feb 2022 20:16:39 +0800 Subject: cleanup merge `doc.type.enums` and `doc.type.resumes` into `doc.type.types` --- script/parser/luadoc.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'script/parser/luadoc.lua') diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index 576cdb5c..a47ebe34 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -570,8 +570,6 @@ function parseType(parent) type = 'doc.type', parent = parent, types = {}, - enums = {}, - resumes = {}, } while true do local tp, content = peekToken() @@ -617,7 +615,7 @@ function parseType(parent) parent = result, [1] = content, } - result.enums[#result.enums+1] = typeEnum + result.types[#result.types+1] = typeEnum if not result.start then result.start = typeEnum.start end @@ -685,7 +683,7 @@ function parseType(parent) else resume.comment = nextComm.text:match('#%s*(.+)', 3) end - result.resumes[#result.resumes+1] = resume + result.types[#result.types+1] = resume result.finish = resume.finish end comments = nil @@ -717,7 +715,7 @@ function parseType(parent) while pushResume() do end end - if #result.types == 0 and #result.enums == 0 and #result.resumes == 0 then + if #result.types == 0 then pushWarning { type = 'LUADOC_MISS_TYPE_NAME', start = getFinish(), -- cgit v1.2.3