summaryrefslogtreecommitdiff
path: root/script
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-09-29 21:17:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-09-29 21:17:15 +0800
commite44142d13914bc98a4f9af0029cfadbc16e222a4 (patch)
tree4c8aadc744e0a3ecc4be059a8e431870379c401f /script
parentf04887db153e16055d67d8a2febb5c3db8fc43c0 (diff)
downloadlua-language-server-e44142d13914bc98a4f9af0029cfadbc16e222a4.zip
resolve #632 `---@module 'moduleName'`
Diffstat (limited to 'script')
-rw-r--r--script/core/noder.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/script/core/noder.lua b/script/core/noder.lua
index 66f88e34..24818c7a 100644
--- a/script/core/noder.lua
+++ b/script/core/noder.lua
@@ -1070,6 +1070,20 @@ compileNodeMap = util.switch()
end
end
end)
+ : case 'doc.module'
+ : call(function (noders, id, source)
+ if not source.module then
+ return
+ end
+ for _, src in ipairs(source.bindSources) do
+ if guide.isSet(src) then
+ local sourceID = getID(src)
+ if sourceID then
+ noders.require[sourceID] = source.module
+ end
+ end
+ end
+ end)
: case 'doc.param'
: call(function (noders, id, source)
pushForward(noders, id, getID(source.extends))