summaryrefslogtreecommitdiff
path: root/script/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-25 11:54:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-25 11:54:31 +0800
commita1a5ac131dd85c11bbe493d1e73740106bb0aa24 (patch)
tree6e862c0e3688f32053a93fe692dbb406e09c03fa /script/vm
parent035f82ff62c20743c8d32ffa9fe95773a8e9df89 (diff)
downloadlua-language-server-a1a5ac131dd85c11bbe493d1e73740106bb0aa24.zip
cleanup
Diffstat (limited to 'script/vm')
-rw-r--r--script/vm/compiler.lua23
1 files changed, 13 insertions, 10 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua
index c38d1450..f6e24d8a 100644
--- a/script/vm/compiler.lua
+++ b/script/vm/compiler.lua
@@ -1225,8 +1225,11 @@ local compilerSwitch = util.switch()
-- for k, v in pairs(t) do
--> for k, v in iterator, status, initValue do
--> local k, v = iterator(status, initValue)
- source._iterator = {}
- source._iterArgs = {{}, {}}
+ source._iterator = {
+ type = 'dummyfunc',
+ parent = source,
+ }
+ source._iterArgs = {{},{}}
-- iterator
selectNode(source._iterator, source.exps, 1)
-- status
@@ -1787,14 +1790,14 @@ local function compileByGlobal(source)
vm.setNode(source, globalNode, true)
-- TODO:don't mix
- local sets = global.links[uri].sets or {}
- local gets = global.links[uri].gets or {}
- for _, set in ipairs(sets) do
- vm.setNode(set, globalNode, true)
- end
- for _, get in ipairs(gets) do
- vm.setNode(get, globalNode, true)
- end
+ --local sets = global.links[uri].sets or {}
+ --local gets = global.links[uri].gets or {}
+ --for _, set in ipairs(sets) do
+ -- vm.setNode(set, globalNode, true)
+ --end
+ --for _, get in ipairs(gets) do
+ -- vm.setNode(get, globalNode, true)
+ --end
if global.cate == 'variable' then
local hasMarkDoc