summaryrefslogtreecommitdiff
path: root/script/vm/global-manager.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-03-04 17:31:27 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-03-04 17:31:27 +0800
commit399c008ba189fe22716d46d2974de1569b1d39e8 (patch)
tree7ba2d3b7c4f5099a8fe5ea5a1e5c68e0a7861485 /script/vm/global-manager.lua
parent171ed306f84850be46620145358dcfdf37387de2 (diff)
downloadlua-language-server-399c008ba189fe22716d46d2974de1569b1d39e8.zip
update
Diffstat (limited to 'script/vm/global-manager.lua')
-rw-r--r--script/vm/global-manager.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/script/vm/global-manager.lua b/script/vm/global-manager.lua
index bda7b744..a225be87 100644
--- a/script/vm/global-manager.lua
+++ b/script/vm/global-manager.lua
@@ -141,6 +141,7 @@ local compilerGlobalMap = util.switch()
local name = guide.getKeyName(source)
local class = m.declareGlobal('type', name, uri)
class:addSet(uri, source)
+ source._globalNode = class
end)
: case 'doc.alias'
: call(function (source)
@@ -148,6 +149,23 @@ local compilerGlobalMap = util.switch()
local name = guide.getKeyName(source)
local alias = m.declareGlobal('type', name, uri)
alias:addSet(uri, source)
+ source._globalNode = alias
+ end)
+ : case 'doc.type.name'
+ : call(function (source)
+ local uri = guide.getUri(source)
+ local name = source[1]
+ local type = m.declareGlobal('type', name, uri)
+ type:addGet(uri, source)
+ source._globalNode = type
+ end)
+ : case 'doc.extends.name'
+ : call(function (source)
+ local uri = guide.getUri(source)
+ local name = source[1]
+ local class = m.declareGlobal('type', name, uri)
+ class:addGet(uri, source)
+ source._globalNode = class
end)
: getMap()