diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-07-05 16:17:52 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-07-05 16:17:52 +0800 |
commit | 788709d4e2a2ae1d412a0afcfddbfbce19d04099 (patch) | |
tree | a7445a7cf8aff0b5ac5c3511e6e2d38dc11057eb /script/parser/guide.lua | |
parent | 14f8d12a617e1a3ec0e3483cbae3447afa7a7aa8 (diff) | |
download | lua-language-server-788709d4e2a2ae1d412a0afcfddbfbce19d04099.zip |
#511 supports `doc.type.literaltable`
Diffstat (limited to 'script/parser/guide.lua')
-rw-r--r-- | script/parser/guide.lua | 6 |
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 |