diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-03-04 17:31:27 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-03-04 17:31:27 +0800 |
commit | 399c008ba189fe22716d46d2974de1569b1d39e8 (patch) | |
tree | 7ba2d3b7c4f5099a8fe5ea5a1e5c68e0a7861485 /script/vm/global-manager.lua | |
parent | 171ed306f84850be46620145358dcfdf37387de2 (diff) | |
download | lua-language-server-399c008ba189fe22716d46d2974de1569b1d39e8.zip |
update
Diffstat (limited to 'script/vm/global-manager.lua')
-rw-r--r-- | script/vm/global-manager.lua | 18 |
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() |