diff options
Diffstat (limited to 'script')
-rw-r--r-- | script/vm/compiler.lua | 2 | ||||
-rw-r--r-- | script/vm/runner.lua | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 6932a8c8..37042d76 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -1313,6 +1313,8 @@ local compilerSwitch = util.switch() else vm.setNode(src, vm.compileNode(src.value), true) end + else + vm.setNode(src, node, true) end return vm.getNode(src) elseif src.type == 'getlocal' then diff --git a/script/vm/runner.lua b/script/vm/runner.lua index 6c3c69a1..8169c8f2 100644 --- a/script/vm/runner.lua +++ b/script/vm/runner.lua @@ -65,7 +65,6 @@ function mt:_collect() and cast.finish < finishPos and guide.getLocal(self._loc, self._loc[1], cast.start) == self._loc then self._casts[#self._casts+1] = cast - self:_markHas(cast) end end end @@ -284,7 +283,7 @@ function mt:_lookIntoChild(action, topNode, outNode) if action.value then self:_lookIntoChild(action.value, topNode) end - topNode = self._callback(action) + topNode = self._callback(action, topNode) end elseif action.type == 'local' then if action.value @@ -307,12 +306,12 @@ function mt:_lookIntoChild(action, topNode, outNode) end end end + ::RETURN:: guide.eachChild(action, function (src) if self._has[src] then self:_lookIntoChild(src, topNode) end end) - ::RETURN:: return topNode, outNode or topNode end |