summaryrefslogtreecommitdiff
path: root/script/vm/sign.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-08 13:12:31 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-08 13:12:31 +0800
commit3771e70b48e9a088cbdc11a8b952d525eea1e7c9 (patch)
tree065b1c5501dfaf1aef5c484f6128bc61cc75d054 /script/vm/sign.lua
parentb8c5db4d443e5a0c638d964104d8966f837eeb6a (diff)
downloadlua-language-server-3771e70b48e9a088cbdc11a8b952d525eea1e7c9.zip
cleanup
Diffstat (limited to 'script/vm/sign.lua')
-rw-r--r--script/vm/sign.lua11
1 files changed, 6 insertions, 5 deletions
diff --git a/script/vm/sign.lua b/script/vm/sign.lua
index 2c440902..eae549e4 100644
--- a/script/vm/sign.lua
+++ b/script/vm/sign.lua
@@ -1,5 +1,7 @@
local guide = require 'parser.guide'
local nodeMgr = require 'vm.node'
+---@class vm
+local vm = require 'vm.vm'
---@class vm.sign
---@field parent parser.object
@@ -19,7 +21,6 @@ function mt:resolve(argNodes)
if not argNodes then
return nil
end
- local typeMgr = require 'vm.type'
local compiler = require 'vm.compiler'
local globalMgr = require 'vm.global-manager'
local resolved = {}
@@ -56,18 +57,18 @@ function mt:resolve(argNodes)
local uvalueNode = compiler.compileNode(ufield.extends)
if ufieldNode.type == 'doc.generic.name' and uvalueNode.type == 'doc.generic.name' then
-- { [number]: number} -> { [K]: V }
- local tfieldNode = typeMgr.getTableKey(node, 'any')
- local tvalueNode = typeMgr.getTableValue(node, 'any')
+ local tfieldNode = vm.getTableKey(node, 'any')
+ local tvalueNode = vm.getTableValue(node, 'any')
resolve(ufieldNode, tfieldNode)
resolve(uvalueNode, tvalueNode)
else
if ufieldNode.type == 'doc.generic.name' then
-- { [number]: number}|number[] -> { [K]: number }
- local tnode = typeMgr.getTableKey(node, uvalueNode)
+ local tnode = vm.getTableKey(node, uvalueNode)
resolve(ufieldNode, tnode)
else
-- { [number]: number}|number[] -> { [number]: V }
- local tnode = typeMgr.getTableValue(node, ufieldNode)
+ local tnode = vm.getTableValue(node, ufieldNode)
resolve(uvalueNode, tnode)
end
end