diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-11-02 20:54:24 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-11-02 20:54:24 +0800 |
commit | fbb038b568fffe8ddbf6946cd0f7d49a624b496a (patch) | |
tree | 89314f1f0261075c7902cbeefeb9f6de60867700 /script/parser | |
parent | 95437dacc0ecfdf7ee6c4b158fbba6dbc21aecd3 (diff) | |
download | lua-language-server-fbb038b568fffe8ddbf6946cd0f7d49a624b496a.zip |
async doc.type.function
Diffstat (limited to 'script/parser')
-rw-r--r-- | script/parser/luadoc.lua | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index 9f286ed4..6f7593c1 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -492,6 +492,19 @@ local function parseTypeUnitLiteralTable() end local function parseTypeUnit(parent, content) + if content == 'async' then + local tp, cont = peekToken() + if tp == 'name' then + if cont == 'fun' then + nextToken() + local func = parseTypeUnit(parent, cont) + if func then + func.async = true + return func + end + end + end + end local result if content == 'fun' then result = parseTypeUnitFunction() |