Skip to content

Commit ffc8917

Browse files
committed
fix runner
1 parent e601608 commit ffc8917

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

script/vm/compiler.lua

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1313,6 +1313,8 @@ local compilerSwitch = util.switch()
13131313
else
13141314
vm.setNode(src, vm.compileNode(src.value), true)
13151315
end
1316+
else
1317+
vm.setNode(src, node, true)
13161318
end
13171319
return vm.getNode(src)
13181320
elseif src.type == 'getlocal' then

script/vm/runner.lua

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ function mt:_collect()
6565
and cast.finish < finishPos
6666
and guide.getLocal(self._loc, self._loc[1], cast.start) == self._loc then
6767
self._casts[#self._casts+1] = cast
68-
self:_markHas(cast)
6968
end
7069
end
7170
end
@@ -284,7 +283,7 @@ function mt:_lookIntoChild(action, topNode, outNode)
284283
if action.value then
285284
self:_lookIntoChild(action.value, topNode)
286285
end
287-
topNode = self._callback(action)
286+
topNode = self._callback(action, topNode)
288287
end
289288
elseif action.type == 'local' then
290289
if action.value
@@ -307,12 +306,12 @@ function mt:_lookIntoChild(action, topNode, outNode)
307306
end
308307
end
309308
end
309+
::RETURN::
310310
guide.eachChild(action, function (src)
311311
if self._has[src] then
312312
self:_lookIntoChild(src, topNode)
313313
end
314314
end)
315-
::RETURN::
316315
return topNode, outNode or topNode
317316
end
318317

0 commit comments

Comments
 (0)