diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-14 18:39:32 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-14 18:39:32 +0800 |
commit | 99ff3b3390465e11a28d9b5acee79e853459c0d7 (patch) | |
tree | fad451752916ce3698ec6150fca729cc6ad15ce9 /script/vm/compiler.lua | |
parent | 781d75e6c786dc63fc4fbd595f08ec1b7f676288 (diff) | |
download | lua-language-server-99ff3b3390465e11a28d9b5acee79e853459c0d7.zip |
check nil
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r-- | script/vm/compiler.lua | 12 |
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 '...' |