diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-10-20 21:13:31 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-10-20 21:13:31 +0800 |
commit | 427d4644164359568170db0a462bb27745725de8 (patch) | |
tree | 130356efb20fe5c49afbe1bb3ea65a813fb23e3b /script-beta/parser/guide.lua | |
parent | 656fb65304e97dab47a4932331de5eda19cb764b (diff) | |
download | lua-language-server-427d4644164359568170db0a462bb27745725de8.zip |
推广到部分 definition
Diffstat (limited to 'script-beta/parser/guide.lua')
-rw-r--r-- | script-beta/parser/guide.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/script-beta/parser/guide.lua b/script-beta/parser/guide.lua index cab37dc1..4a6ce1cb 100644 --- a/script-beta/parser/guide.lua +++ b/script-beta/parser/guide.lua @@ -1390,17 +1390,17 @@ function m.checkSameSimpleInSpecialBranch(status, obj, start, queue) end end -function m.checkSameSimpleByBindDocs(status, obj, start, queue) +function m.checkSameSimpleByBindDocs(status, obj, start, queue, mode) if not obj.bindDocs then return end local results = {} for _, doc in ipairs(obj.bindDocs) do if doc.type == 'doc.class' then - results = stepRefOfDocType(status, doc.class, 'ref') + results = stepRefOfDocType(status, doc.class, mode) elseif doc.type == 'doc.type' then for _, piece in ipairs(doc.types) do - local pieceResult = stepRefOfDocType(status, piece, 'ref') + local pieceResult = stepRefOfDocType(status, piece, mode) for _, res in ipairs(pieceResult) do results[#results+1] = res end @@ -1894,7 +1894,7 @@ function m.checkSameSimple(status, simple, data, mode, results, queue) -- 检查自己是特殊变量的分支的情况 m.checkSameSimpleInSpecialBranch(status, ref, i, queue) -- 检查 doc - m.checkSameSimpleByBindDocs(status, ref, i, queue) + m.checkSameSimpleByBindDocs(status, ref, i, queue, cmode) if cmode == 'ref' and not status.simple then -- 检查形如 { a = f } 的情况 m.checkSameSimpleAsTableField(status, ref, i, queue) |