diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-07 00:43:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-07 00:43:00 +0800 |
commit | e250b80fbc3ee9f69fd5ed78fa4f858925c182fd (patch) | |
tree | d06255f6713fdeb358dbc37e2d80ab2f1fba9267 /script | |
parent | fa430fa6225ea1c78ffc263bf0e9bb612fc15a03 (diff) | |
download | lua-language-server-e250b80fbc3ee9f69fd5ed78fa4f858925c182fd.zip |
update
Diffstat (limited to 'script')
-rw-r--r-- | script/vm/compiler.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/script/vm/compiler.lua b/script/vm/compiler.lua index 7c5eb721..57816e24 100644 --- a/script/vm/compiler.lua +++ b/script/vm/compiler.lua @@ -362,7 +362,6 @@ local function getReturn(func, index, args) end local function bindDocs(source) - local hasFounded = false local isParam = source.parent.type == 'funcargs' or source.parent.type == 'in' local docs = source.bindDocs @@ -389,6 +388,20 @@ local function bindDocs(source) return true end end + if doc.type == 'doc.module' then + local name = doc.module + local uri = rpath.findUrisByRequirePath(guide.getUri(source), name)[1] + if not uri then + return nil + end + local state = files.getState(uri) + local ast = state and state.ast + if not ast then + return nil + end + nodeMgr.setNode(source, m.compileNode(ast)) + return true + end end return false end |