diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-20 21:55:41 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-20 21:55:41 +0800 |
commit | c63b2e404d8d2bb984afe3678a5ba2b2836380cc (patch) | |
tree | a70661effacc7a29caa8d49583673ac4be2faaf5 /script/vm/ipairs.lua | |
parent | 85c5a4210e4447422cd5677369ae740ed65725a0 (diff) | |
download | lua-language-server-c63b2e404d8d2bb984afe3678a5ba2b2836380cc.zip |
remove the old version
Diffstat (limited to 'script/vm/ipairs.lua')
-rw-r--r-- | script/vm/ipairs.lua | 51 |
1 files changed, 0 insertions, 51 deletions
diff --git a/script/vm/ipairs.lua b/script/vm/ipairs.lua deleted file mode 100644 index cb8356da..00000000 --- a/script/vm/ipairs.lua +++ /dev/null @@ -1,51 +0,0 @@ -local mt = require 'vm.manager' -local library = require 'vm.library' - ----@param func emmyFunction -function mt:callIpairs(func, values, source) - local tbl = values[1] - func:setReturn(1, library.special['@ipairs']) - func:setReturn(2, tbl) -end - ----@param func emmyFunction -function mt:callAtIpairs(func, values, source) - local tbl = values[1] - if tbl then - local emmy = tbl:getEmmy() - if emmy then - if emmy.type == 'emmy.arrayType' then - local value = self:createValue(emmy:getName(), source) - func:setReturn(2, value) - end - end - end -end - ----@param func emmyFunction -function mt:callPairs(func, values, source) - local tbl = values[1] - func:setReturn(1, library.special['next']) - func:setReturn(2, tbl) -end - ----@param func emmyFunction -function mt:callNext(func, values, source) - local tbl = values[1] - if tbl then - local emmy = tbl:getEmmy() - if emmy then - if emmy.type == 'emmy.arrayType' then - local key = self:createValue('integer', source) - local value = self:createValue(emmy:getName(), source) - func:setReturn(1, key) - func:setReturn(2, value) - elseif emmy.type == 'emmy.tableType' then - local key = self:createValue(emmy:getKeyType():getType(), source) - local value = self:createValue(emmy:getValueType():getType(), source) - func:setReturn(1, key) - func:setReturn(2, value) - end - end - end -end |