summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--script/parser/guide.lua2
-rw-r--r--script/vm/compiler.lua23
2 files changed, 14 insertions, 11 deletions
diff --git a/script/parser/guide.lua b/script/parser/guide.lua
index 1e07d987..06169b09 100644
--- a/script/parser/guide.lua
+++ b/script/parser/guide.lua
@@ -58,7 +58,7 @@ local type = type
---@field step parser.object
---@field redundant { max: integer, passed: integer }
---@field filter parser.object
----@field loc string
+---@field loc parser.object
---@field keyword integer[]
---@field casts parser.object[]
---@field mode? '+' | '-'
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