summaryrefslogtreecommitdiff
path: root/server/src/vm/vm.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2019-04-15 17:23:01 +0800
committersumneko <sumneko@hotmail.com>2019-04-15 17:23:01 +0800
commit66ab0517b0ca771fdfb92af87f2bfb8216a13777 (patch)
tree28d905ede5b8194c05ae77e4e3f6bcc7d793ede5 /server/src/vm/vm.lua
parent0fe4e33123b03003689b96567d6aa13d5805d4d6 (diff)
downloadlua-language-server-66ab0517b0ca771fdfb92af87f2bfb8216a13777.zip
检查空block
Diffstat (limited to 'server/src/vm/vm.lua')
-rw-r--r--server/src/vm/vm.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua
index cd24f1ad..ef3ce27b 100644
--- a/server/src/vm/vm.lua
+++ b/server/src/vm/vm.lua
@@ -851,6 +851,7 @@ function mt:doLocal(action)
end
function mt:doIf(action)
+ self:instantSource(action)
for _, block in ipairs(action) do
if block.filter then
self:getExp(block.filter)
@@ -863,7 +864,7 @@ function mt:doIf(action)
end
function mt:doLoop(action)
-
+ self:instantSource(action)
local min = self:getFirstInMulti(self:getExp(action.min))
self:getExp(action.max)
if action.step then
@@ -877,6 +878,7 @@ function mt:doLoop(action)
end
function mt:doIn(action)
+ self:instantSource(action)
local args = self:unpackList(action.exp)
self:scopePush(action)
@@ -893,7 +895,7 @@ function mt:doIn(action)
end
function mt:doWhile(action)
-
+ self:instantSource(action)
self:getExp(action.filter)
self:scopePush(action)