summaryrefslogtreecommitdiff
path: root/script/core/noder.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-05-25 15:54:50 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-05-25 15:54:50 +0800
commit8f420030bf306d78583863356b13b716d30bebda (patch)
treed60ca7a6cd0118d04ad436e27b971d33de8a34e9 /script/core/noder.lua
parentd7c638969636879dd465e785b6edef0007c2b435 (diff)
downloadlua-language-server-8f420030bf306d78583863356b13b716d30bebda.zip
update
Diffstat (limited to 'script/core/noder.lua')
-rw-r--r--script/core/noder.lua15
1 files changed, 10 insertions, 5 deletions
diff --git a/script/core/noder.lua b/script/core/noder.lua
index 11d20f40..9031dd07 100644
--- a/script/core/noder.lua
+++ b/script/core/noder.lua
@@ -155,11 +155,11 @@ local function getKey(source)
end
elseif source.type == 'doc.class'
or source.type == 'doc.type'
- or source.type == 'doc.alias'
or source.type == 'doc.param'
or source.type == 'doc.vararg'
or source.type == 'doc.field.name'
or source.type == 'doc.type.enum'
+ or source.type == 'doc.resume'
or source.type == 'doc.type.table'
or source.type == 'doc.type.array'
or source.type == 'doc.type.function' then
@@ -223,9 +223,6 @@ local function checkMode(source)
if source.type == 'doc.param' then
return 'dp:'
end
- if source.type == 'doc.alias' then
- return 'da:'
- end
if source.type == 'doc.type.function' then
return 'dfun:'
end
@@ -238,7 +235,8 @@ local function checkMode(source)
if source.type == 'doc.vararg' then
return 'dv:'
end
- if source.type == 'doc.type.enum' then
+ if source.type == 'doc.type.enum'
+ or source.type == 'doc.resume' then
return 'de:'
end
if source.type == 'generic.closure' then
@@ -436,6 +434,13 @@ function m.compileNode(noders, source)
for _, enumUnit in ipairs(source.enums) do
pushForward(noders, id, getID(enumUnit))
end
+ for _, resumeUnit in ipairs(source.resumes) do
+ pushForward(noders, id, getID(resumeUnit))
+ end
+ end
+ -- 分解 @alias
+ if source.type == 'doc.alias' then
+ pushForward(noders, getID(source.alias), getID(source.extends))
end
-- 分解 @class
if source.type == 'doc.class' then