summaryrefslogtreecommitdiff
path: root/script/vm/compiler.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-14 18:39:32 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-14 18:39:32 +0800
commit99ff3b3390465e11a28d9b5acee79e853459c0d7 (patch)
treefad451752916ce3698ec6150fca729cc6ad15ce9 /script/vm/compiler.lua
parent781d75e6c786dc63fc4fbd595f08ec1b7f676288 (diff)
downloadlua-language-server-99ff3b3390465e11a28d9b5acee79e853459c0d7.zip
check nil
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r--script/vm/compiler.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 42cc1aa2..66492a5e 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1076,18 +1076,30 @@ local compilerSwitch = util.switch()
end)
: case 'doc.field'
: call(function (source)
+ if not source.extends then
+ return
+ end
vm.setNode(source, vm.compileNode(source.extends))
end)
: case 'doc.type.field'
: call(function (source)
+ if not source.extends then
+ return
+ end
vm.setNode(source, vm.compileNode(source.extends))
end)
: case 'doc.param'
: call(function (source)
+ if not source.extends then
+ return
+ end
vm.setNode(source, vm.compileNode(source.extends))
end)
: case 'doc.vararg'
: call(function (source)
+ if not source.vararg then
+ return
+ end
vm.setNode(source, vm.compileNode(source.vararg))
end)
: case '...'