diff options
author | sumneko <sumneko@hotmail.com> | 2019-04-29 21:51:50 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-04-29 21:51:50 +0800 |
commit | bb56cb2c21bf6a6c7a6c3bf6bb069bc69c1f903c (patch) | |
tree | 294f29bbb03a357838545c42f6ab15ea5ef942c1 /server/src/vm/vm.lua | |
parent | ba5e88985b5344789100b1e8d91b68fe1f2cab1a (diff) | |
download | lua-language-server-bb56cb2c21bf6a6c7a6c3bf6bb069bc69c1f903c.zip |
emmy.arrayType
Diffstat (limited to 'server/src/vm/vm.lua')
-rw-r--r-- | server/src/vm/vm.lua | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua index d057c1cd..fab500e5 100644 --- a/server/src/vm/vm.lua +++ b/server/src/vm/vm.lua @@ -14,6 +14,7 @@ local mt = require 'vm.manager' require 'vm.module' require 'vm.raw' require 'vm.pcall' +require 'vm.ipairs' require 'vm.emmy' -- TODO source测试 @@ -296,6 +297,14 @@ function mt:callLibrary(func, values, source, lib) self:callPcall(func, values, source) elseif lib.special == 'xpcall' then self:callXpcall(func, values, source) + elseif lib.special == 'ipairs' then + self:callIpairs(func, values, source) + elseif lib.special == '@ipairs' then + self:callAtIpairs(func, values, source) + elseif lib.special == 'pairs' then + self:callPairs(func, values, source) + elseif lib.special == 'next' then + self:callNext(func, values, source) end else -- 如果lib的参数中有function,则立即执行function |