summaryrefslogtreecommitdiff
path: root/script-beta/core/document-symbol.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-10-09 16:38:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-10-09 16:38:22 +0800
commitc0e93478ef0e11aa8aa556af15815e6415cabc3f (patch)
tree14117b6ac8234c4b2a1ed4f20f41df8a08efeb68 /script-beta/core/document-symbol.lua
parente1d289cad9e36911c9e69128e218ad0d1002849f (diff)
downloadlua-language-server-c0e93478ef0e11aa8aa556af15815e6415cabc3f.zip
修正一个报错
Diffstat (limited to 'script-beta/core/document-symbol.lua')
-rw-r--r--script-beta/core/document-symbol.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script-beta/core/document-symbol.lua b/script-beta/core/document-symbol.lua
index 817db95e..6f3e788f 100644
--- a/script-beta/core/document-symbol.lua
+++ b/script-beta/core/document-symbol.lua
@@ -98,11 +98,13 @@ local function buildValue(source, symbols)
range = { source.field.start, source.field.finish }
sRange = { source.field.start, source.field.finish }
kind = skind.Property
- else
+ elseif source.type == 'setfield' then
details[1] = 'field'
range = { source.field.start, source.field.finish }
sRange = { source.field.start, source.field.finish }
kind = skind.Field
+ else
+ return
end
if source.value then
local literal = source.value[1]