summaryrefslogtreecommitdiff
path: root/script/core/linker.lua
diff options
context:
space:
mode:
Diffstat (limited to 'script/core/linker.lua')
-rw-r--r--script/core/linker.lua15
1 files changed, 11 insertions, 4 deletions
diff --git a/script/core/linker.lua b/script/core/linker.lua
index d9f3630a..e57cbaa0 100644
--- a/script/core/linker.lua
+++ b/script/core/linker.lua
@@ -142,6 +142,7 @@ local function getKey(source)
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.type.table'
or source.type == 'doc.type.array'
or source.type == 'doc.type.function' then
@@ -217,6 +218,9 @@ local function checkMode(source)
if source.type == 'doc.vararg' then
return 'dv:'
end
+ if source.type == 'doc.type.enum' then
+ return 'de:'
+ end
if source.type == 'generic.closure' then
return 'gc:'
end
@@ -388,6 +392,9 @@ function m.compileLink(source)
pushForward(id, getID(typeUnit))
pushBackward(getID(typeUnit), id)
end
+ for _, enumUnit in ipairs(source.enums) do
+ pushForward(id, getID(enumUnit))
+ end
end
-- 分解 @class
if source.type == 'doc.class' then
@@ -532,12 +539,12 @@ function m.compileLink(source)
end
end
if source.type == 'doc.type.table' then
- if source.value then
+ if source.tvalue then
local valueID = ('%s%s'):format(
id,
SPLIT_CHAR
)
- pushForward(valueID, getID(source.value))
+ pushForward(valueID, getID(source.tvalue))
end
end
if source.type == 'doc.type.array' then
@@ -657,12 +664,12 @@ function m.compileLink(source)
pushForward(nodeID, getID(source.node))
end
if proto.type == 'doc.type.table' then
- if source.value then
+ if source.tvalue then
local valueID = ('%s%s'):format(
id,
SPLIT_CHAR
)
- pushForward(valueID, getID(source.value))
+ pushForward(valueID, getID(source.tvalue))
end
end
end