diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-26 16:32:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-26 16:32:05 +0800 |
commit | a7a37c564f0b584b993eaec4c3dd164abdbd543f (patch) | |
tree | f39176779926cfc7d259f17c7c5997fe5ec70aa8 /script/vm/type.lua | |
parent | 08135e067336d2767029c4a7b907e5df0a0d942b (diff) | |
download | lua-language-server-a7a37c564f0b584b993eaec4c3dd164abdbd543f.zip |
cleanup
Diffstat (limited to 'script/vm/type.lua')
-rw-r--r-- | script/vm/type.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/script/vm/type.lua b/script/vm/type.lua index 691490ec..c3264993 100644 --- a/script/vm/type.lua +++ b/script/vm/type.lua @@ -1,4 +1,3 @@ -local globalMgr = require 'vm.global-manager' ---@class vm local vm = require 'vm.vm' @@ -9,10 +8,10 @@ local vm = require 'vm.vm' ---@return boolean function vm.isSubType(uri, child, parent, mark) if type(parent) == 'string' then - parent = vm.createNode(globalMgr.getGlobal('type', parent)) + parent = vm.createNode(vm.getGlobal('type', parent)) end if type(child) == 'string' then - child = vm.createNode(globalMgr.getGlobal('type', child)) + child = vm.createNode(vm.getGlobal('type', child)) end if not child or not parent then @@ -134,7 +133,7 @@ function vm.getTableKey(uri, tnode, vnode) end end if tn.type == 'doc.type.array' then - result:merge(globalMgr.declareGlobal('type', 'integer')) + result:merge(vm.declareGlobal('type', 'integer')) end if tn.type == 'table' then for _, field in ipairs(tn) do @@ -144,10 +143,10 @@ function vm.getTableKey(uri, tnode, vnode) end end if field.type == 'tablefield' then - result:merge(globalMgr.declareGlobal('type', 'string')) + result:merge(vm.declareGlobal('type', 'string')) end if field.type == 'tableexp' then - result:merge(globalMgr.declareGlobal('type', 'integer')) + result:merge(vm.declareGlobal('type', 'integer')) end end end |