diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-09 20:00:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-09 20:00:38 +0800 |
commit | 19e05519b9bd0ec913e4b19913fb5f8288102021 (patch) | |
tree | 94ef24a56612e6939b1514ddc4719c2103478cee /script-beta/parser | |
parent | fc0a565b7bbc6b428d559e2981ae2719717ffb30 (diff) | |
download | lua-language-server-19e05519b9bd0ec913e4b19913fb5f8288102021.zip |
doc.return.name 用语义着色实现
Diffstat (limited to 'script-beta/parser')
-rw-r--r-- | script-beta/parser/guide.lua | 2 | ||||
-rw-r--r-- | script-beta/parser/luadoc.lua | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index 43db26fe..c9f4eb48 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -85,7 +85,7 @@ m.childMap = { ['doc'] = {'#'}, ['doc.class'] = {'class', 'extends'}, - ['doc.type'] = {'#types', '#enums'}, + ['doc.type'] = {'#types', '#enums', 'name'}, ['doc.alias'] = {'alias', 'extends'}, ['doc.param'] = {'param', 'extends'}, ['doc.return'] = {'#returns'}, diff --git a/script-beta/parser/luadoc.lua b/script-beta/parser/luadoc.lua index 13d80874..59d2e9b9 100644 --- a/script-beta/parser/luadoc.lua +++ b/script-beta/parser/luadoc.lua @@ -483,6 +483,7 @@ local function parseReturn() if not result.start then result.start = docType.start end + docType.name = parseName('doc.return.name', docType) if checkToken('symbol', '?', 1) then nextToken() docType.optional = true |