diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-07-04 20:18:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-07-04 20:18:16 +0800 |
commit | ffc89179de7598fce8bd0db54f09275d09d3f5b2 (patch) | |
tree | 96381aef0f14d858f3584a82d3667d755eb3379e /script | |
parent | e601608ed7da7e88a31775cc459905d406558ae2 (diff) | |
download | lua-language-server-ffc89179de7598fce8bd0db54f09275d09d3f5b2.zip |
fix runner
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 |