summaryrefslogtreecommitdiff
path: root/script/vm/global-manager.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-02-24 20:32:09 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-02-24 20:32:09 +0800
commite4606599ee4f6d5c8d10fd4e7ecbe315e4b65c3b (patch)
tree1310fa89c3a8789b2b13161be6f9afee2fae96a9 /script/vm/global-manager.lua
parent38f1b173dd57e163ee7821560566cb59e1ac95cd (diff)
downloadlua-language-server-e4606599ee4f6d5c8d10fd4e7ecbe315e4b65c3b.zip
update
Diffstat (limited to 'script/vm/global-manager.lua')
-rw-r--r--script/vm/global-manager.lua7
1 files changed, 2 insertions, 5 deletions
diff --git a/script/vm/global-manager.lua b/script/vm/global-manager.lua
index 86f6be9f..b9f22b43 100644
--- a/script/vm/global-manager.lua
+++ b/script/vm/global-manager.lua
@@ -31,7 +31,6 @@ local compilerGlobalMap = util.switch()
local name = guide.getKeyName(source)
local global = m.declareGlobal(name, uri)
global:addSet(uri, source)
- m.globalSubs[uri][name] = true
source._globalNode = global
end)
: case 'getglobal'
@@ -39,7 +38,6 @@ local compilerGlobalMap = util.switch()
local name = guide.getKeyName(source)
local global = m.declareGlobal(name, uri)
global:addGet(uri, source)
- m.globalSubs[uri][name] = true
source._globalNode = global
local nxt = source.next
@@ -60,7 +58,7 @@ local compilerGlobalMap = util.switch()
local name = parent:getName() .. m.ID_SPLITE .. guide.getKeyName(source)
local global = m.declareGlobal(name, uri)
global:addSet(uri, source)
- m.globalSubs[uri][name] = true
+ source._globalNode = global
end)
: case 'getfield'
: case 'getmethod'
@@ -73,8 +71,7 @@ local compilerGlobalMap = util.switch()
return
end
local name = parent:getName() .. m.ID_SPLITE .. guide.getKeyName(source)
- local global = m.getGlobal(name)
- m.globalSubs[uri][name] = true
+ local global = m.declareGlobal(name, uri)
global:addGet(uri, source)
source._globalNode = global