diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-29 20:36:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-29 20:36:03 +0800 |
commit | 041c2f1df230c5ba65fe9003d26067eecd4089d0 (patch) | |
tree | 0415a7325a3324ae412a46287fc1a13e3553f9a0 | |
parent | d5718139f34437e8f13d1eebef3bf2241f23763e (diff) | |
download | lua-language-server-041c2f1df230c5ba65fe9003d26067eecd4089d0.zip |
cleanup
-rw-r--r-- | script/core/searcher.lua | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/script/core/searcher.lua b/script/core/searcher.lua index 71db8638..0576a21f 100644 --- a/script/core/searcher.lua +++ b/script/core/searcher.lua @@ -331,7 +331,7 @@ function m.searchRefsByID(status, uri, expect, mode) footprint(status, 'pop:', id, field) end - local function checkLastID(id, field) + local function splitID(id, field) if field then return end @@ -503,7 +503,7 @@ function m.searchRefsByID(status, uri, expect, mode) end end - local function checkSpecial(id, field) + local function searchSpecial(id, field) -- Special rule: ('').XX -> stringlib.XX if id == 'str:' or id == 'dn:string' then @@ -526,7 +526,7 @@ function m.searchRefsByID(status, uri, expect, mode) end end - local function checkGlobal(id, node, field) + local function searchGlobal(id, node, field) if id:sub(1, 2) ~= 'g:' then return end @@ -563,7 +563,7 @@ function m.searchRefsByID(status, uri, expect, mode) --popTag('forward', 'set') end - local function checkClass(id, node, field) + local function searchClass(id, node, field) if id:sub(1, 3) ~= 'dn:' then return end @@ -659,7 +659,7 @@ function m.searchRefsByID(status, uri, expect, mode) return false end - local function checkAnyField(id, field) + local function searchAnyField(id, field) if mode == 'ref' or mode == 'allref' then return end @@ -679,7 +679,7 @@ function m.searchRefsByID(status, uri, expect, mode) end end - local function checkWeak(id, field) + local function searchWeak(id, field) local lastID = noder.getLastID(id) if not lastID then return @@ -721,7 +721,7 @@ function m.searchRefsByID(status, uri, expect, mode) stop(status, 'too deep!') return end - checkSpecial(id, field) + searchSpecial(id, field) local node = noder.getNodeByID(root, id) if node then searchNode(id, node, field) @@ -729,11 +729,11 @@ function m.searchRefsByID(status, uri, expect, mode) return end end - checkGlobal(id, node, field) - checkClass(id, node, field) - checkLastID(id, field) - checkAnyField(id, field) - checkWeak(id, field) + searchGlobal(id, node, field) + searchClass(id, node, field) + splitID(id, field) + searchAnyField(id, field) + searchWeak(id, field) end search(expect) |