diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-02-09 20:16:39 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-02-09 20:16:39 +0800 |
commit | 3932717d816bfc4f98cd9640daca51fb6f2afe8c (patch) | |
tree | 934e153b2a5b1427de71e4dc87074bc6b7ae9b71 /script/parser/luadoc.lua | |
parent | 2a439122a6d6d841fb99f08a1276c4400e5360fa (diff) | |
download | lua-language-server-3932717d816bfc4f98cd9640daca51fb6f2afe8c.zip |
cleanup
merge `doc.type.enums` and `doc.type.resumes` into `doc.type.types`
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r-- | script/parser/luadoc.lua | 8 |
1 files changed, 3 insertions, 5 deletions
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(), |