From f348c94ad9be0b873a865fc90c6c0a69de7b71a7 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 Oct 2020 17:28:17 +0800 Subject: =?UTF-8?q?table=E4=B9=9F=E5=8F=AF=E4=BB=A5=E5=81=9A=E4=B8=BAclass?= =?UTF-8?q?=E7=9A=84=E5=90=8D=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-beta/parser/luadoc.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'script-beta/parser/luadoc.lua') diff --git a/script-beta/parser/luadoc.lua b/script-beta/parser/luadoc.lua index c84cf52b..5481168f 100644 --- a/script-beta/parser/luadoc.lua +++ b/script-beta/parser/luadoc.lua @@ -228,6 +228,9 @@ local function nextSymbolOrError(symbol) end local function parseTypeUnitTable() + if not checkToken('symbol', '<', 1) then + return nil + end local typeUnit = { type = 'doc.type.table', start = getStart(), @@ -323,7 +326,8 @@ local function parseTypeUnit(parent, content) typeUnit = parseTypeUnitTable() elseif content == 'fun' then typeUnit = parseTypeUnitFunction() - else + end + if not typeUnit then typeUnit = { type = 'doc.type.name', start = getStart(), -- cgit v1.2.3