diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-14 18:23:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-14 18:23:00 +0800 |
commit | 14c7a7d12673a7ee1ada6a0289270e34616114ab (patch) | |
tree | e6a5f445108a5b1af2dfe1c38f9cf66d348bc5cd /script/vm/compiler.lua | |
parent | 75a7cabcbc37b39a6932ddd13dc847c505077de7 (diff) | |
download | lua-language-server-14c7a7d12673a7ee1ada6a0289270e34616114ab.zip |
update
Diffstat (limited to 'script/vm/compiler.lua')
-rw-r--r-- | script/vm/compiler.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 5442a425..42cc1aa2 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -791,7 +791,7 @@ local compilerSwitch = util.switch() : case 'local' : call(function (source) local baseNode = compileLocalBase(source) - vm.setNode(source, baseNode) + vm.setNode(source, baseNode, true) if not baseNode:getData 'hasDefined' and source.ref then for _, ref in ipairs(source.ref) do if ref.type == 'setlocal' then @@ -810,11 +810,15 @@ local compilerSwitch = util.switch() vm.setNode(source, vm.compileNode(source.value)) end end - vm.setNode(source, vm.compileNode(source.node)) + baseNode:merge(vm.getNode(source)) + vm.setNode(source, baseNode, true) + vm.compileNode(source.node) end) : case 'getlocal' : call(function (source) - vm.setNode(source, vm.compileNode(source.node)) + local baseNode = compileLocalBase(source.node) + vm.setNode(source, baseNode, true) + vm.compileNode(source.node) end) : case 'setfield' : case 'setmethod' |