diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-10-20 17:28:17 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-10-20 17:28:17 +0800 |
commit | f348c94ad9be0b873a865fc90c6c0a69de7b71a7 (patch) | |
tree | 5fbf28ed857d0c2391865d3225a6cb348748858a /script-beta/parser/luadoc.lua | |
parent | 135f38d1b4f4d7b989f738bead5b59bdaf58f7e1 (diff) | |
download | lua-language-server-f348c94ad9be0b873a865fc90c6c0a69de7b71a7.zip |
table也可以做为class的名字
Diffstat (limited to 'script-beta/parser/luadoc.lua')
-rw-r--r-- | script-beta/parser/luadoc.lua | 6 |
1 files changed, 5 insertions, 1 deletions
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(), |