summaryrefslogtreecommitdiff
path: root/script/vm/global-manager.lua
diff options
context:
space:
mode:
authorsumneko <sumneko@hotmail.com>2022-03-11 01:10:51 +0800
committersumneko <sumneko@hotmail.com>2022-03-11 01:12:00 +0800
commit54b1e1123f242e5b5ffe8cc5ca51afe3cf18b4a1 (patch)
tree2707966fc8dd1730d9019e4478e18f6dc17c90b0 /script/vm/global-manager.lua
parent8a7c94965cf6c632b3b85956f0e64928df8dc42d (diff)
downloadlua-language-server-54b1e1123f242e5b5ffe8cc5ca51afe3cf18b4a1.zip
cleanup
Diffstat (limited to 'script/vm/global-manager.lua')
-rw-r--r--script/vm/global-manager.lua15
1 files changed, 8 insertions, 7 deletions
diff --git a/script/vm/global-manager.lua b/script/vm/global-manager.lua
index 2ffaf3da..3c42840c 100644
--- a/script/vm/global-manager.lua
+++ b/script/vm/global-manager.lua
@@ -1,7 +1,8 @@
local util = require 'utility'
local guide = require 'parser.guide'
local globalBuilder = require 'vm.global'
-local genericMgr = require 'vm.generic-manager'
+local signMgr = require 'vm.sign'
+local genericMgr = require 'vm.generic'
---@class parser.object
---@field _globalNode vm.node.global
@@ -145,14 +146,14 @@ local compilerGlobalMap = util.switch()
source._globalNode = class
if source.signs then
- source._generic = genericMgr(source)
+ source._sign = signMgr()
for _, sign in ipairs(source.signs) do
- source._generic:addSign(sign)
+ source._sign:addSign(sign)
end
if source.extends then
for _, ext in ipairs(source.extends) do
if ext.type == 'doc.type.table' then
- ext._generic = source._generic:getChild(ext)
+ ext._generic = genericMgr(ext, source._sign)
end
end
end
@@ -167,11 +168,11 @@ local compilerGlobalMap = util.switch()
source._globalNode = alias
if source.signs then
- source._generic = genericMgr(source)
+ source._sign = signMgr()
for _, sign in ipairs(source.signs) do
- source._generic:addSign(sign)
+ source._sign:addSign(sign)
end
- source.extends._generic = source._generic:getChild(source.extends)
+ source.extends._generic = genericMgr(source.extends, source._sign)
end
end)
: case 'doc.type.name'