diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-10-31 14:30:26 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-10-31 14:30:26 +0800 |
commit | 4d65d77f5214bf5dd935956c861580ff2b46bfe4 (patch) | |
tree | 05266557abeb44e99ac242f16d13f90ecb86c7a7 /script/parser/luadoc.lua | |
parent | a498527cd98f683bf61e86430766ddc20e063c49 (diff) | |
download | lua-language-server-4d65d77f5214bf5dd935956c861580ff2b46bfe4.zip |
add `---@package`
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r-- | script/parser/luadoc.lua | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index 8a671dbc..0e560b0d 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -992,7 +992,8 @@ local docSwitch = util.switch() if value == 'public' or value == 'protected' or value == 'private' - or value == 'public' then + or value == 'public' + or value == 'package' then result.visible = value result.start = getStart() return true @@ -1470,6 +1471,14 @@ local docSwitch = util.switch() finish = getFinish(), } end) + : case 'package' + : call(function () + return { + type = 'doc.package', + start = getFinish(), + finish = getFinish(), + } + end) local function convertTokens(doc) local tp, text = nextToken() @@ -1688,7 +1697,8 @@ local function bindDoc(source, binded) or doc.type == 'doc.source' or doc.type == 'doc.private' or doc.type == 'doc.protected' - or doc.type == 'doc.public' then + or doc.type == 'doc.public' + or doc.type == 'doc.package' then if source.type == 'function' or isParam then goto CONTINUE |