summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-22 03:56:16 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-22 03:56:24 +0800
commitcdb6c06ca2983f1caf1a0964997c8c44ea784b27 (patch)
treeb5356d6ad6e5c076d2e63140e9f72469987f5f49 /script/vm
parentb26b7f7029d895c672a0a4d057d00b36355acaa7 (diff)
downloadlua-language-server-cdb6c06ca2983f1caf1a0964997c8c44ea784b27.zip
check nil
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index 4395eea4..7bb9ba1b 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -497,7 +497,9 @@ local function bindAs(source)
end
for _, doc in ipairs(docs) do
if doc.type == 'doc.as' and doc.originalComment.start == source.finish + 2 then
- vm.setNode(source, vm.compileNode(doc.as), true)
+ if doc.as then
+ vm.setNode(source, vm.compileNode(doc.as), true)
+ end
return true
end
end