summaryrefslogtreecommitdiff
path: root/script-beta/parser
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-11-09 20:00:38 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-11-09 20:00:38 +0800
commit19e05519b9bd0ec913e4b19913fb5f8288102021 (patch)
tree94ef24a56612e6939b1514ddc4719c2103478cee /script-beta/parser
parentfc0a565b7bbc6b428d559e2981ae2719717ffb30 (diff)
downloadlua-language-server-19e05519b9bd0ec913e4b19913fb5f8288102021.zip
doc.return.name 用语义着色实现
Diffstat (limited to 'script-beta/parser')
-rw-r--r--script-beta/parser/guide.lua2
-rw-r--r--script-beta/parser/luadoc.lua1
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