diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-11-15 11:28:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-11-15 11:28:00 +0800 |
commit | 6f0e8df7934b9c41aac83a6c0b4b0f50a9b50871 (patch) | |
tree | 6e342aec35fea50fbfc3ecccdb17e0b5f31c5965 /script/parser | |
parent | 51ee59203868cfe1177403a06d74ae7412c78f4d (diff) | |
download | lua-language-server-6f0e8df7934b9c41aac83a6c0b4b0f50a9b50871.zip |
fix #1698
Diffstat (limited to 'script/parser')
-rw-r--r-- | script/parser/guide.lua | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua index b40207ed..32f94584 100644 --- a/script/parser/guide.lua +++ b/script/parser/guide.lua @@ -953,26 +953,14 @@ function m.getKeyNameOfLiteral(obj) if tp == 'field' or tp == 'method' then return obj[1] - elseif tp == 'string' then - local s = obj[1] - if s then - return s - end - elseif tp == 'number' then - local n = obj[1] - if n then - return obj[1] - end - elseif tp == 'integer' then - local n = obj[1] - if n then - return obj[1] - end - elseif tp == 'boolean' then - local b = obj[1] - if b then - return b - end + elseif tp == 'string' + or tp == 'number' + or tp == 'integer' + or tp == 'boolean' + or tp == 'doc.type.integer' + or tp == 'doc.type.string' + or tp == 'doc.type.boolean' then + return obj[1] end end |