summaryrefslogtreecommitdiff
path: root/script/parser/guide.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-07-05 16:17:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-07-05 16:17:52 +0800
commit788709d4e2a2ae1d412a0afcfddbfbce19d04099 (patch)
treea7445a7cf8aff0b5ac5c3511e6e2d38dc11057eb /script/parser/guide.lua
parent14f8d12a617e1a3ec0e3483cbae3447afa7a7aa8 (diff)
downloadlua-language-server-788709d4e2a2ae1d412a0afcfddbfbce19d04099.zip
#511 supports `doc.type.literaltable`
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r--script/parser/guide.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index d88bd2d0..2508b801 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -129,7 +129,7 @@ m.childMap = {
['doc.type.array'] = {'node'},
['doc.type.table'] = {'tkey', 'tvalue', 'comment'},
['doc.type.function'] = {'#args', '#returns', 'comment'},
- ['doc.type.ltable'] = {'#fields'},
+ ['doc.type.ltable'] = {'#fields', 'comment'},
['doc.type.literal'] = {'node'},
['doc.type.arg'] = {'extends'},
['doc.type.field'] = {'extends'},
@@ -877,6 +877,8 @@ function m.getKeyName(obj)
return obj.field[1]
elseif tp == 'doc.field.name' then
return obj[1]
+ elseif tp == 'doc.type.field' then
+ return obj.name[1]
elseif tp == 'dummy' then
return obj[1]
end
@@ -935,6 +937,8 @@ function m.getKeyType(obj)
return 'string'
elseif tp == 'doc.field' then
return 'string'
+ elseif tp == 'doc.type.field' then
+ return 'string'
elseif tp == 'dummy' then
return 'string'
end