summaryrefslogtreecommitdiff
path: root/server-beta/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-25 17:45:55 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-25 17:45:55 +0800
commit51cb6529d23b01586a60c2a015f22dd1eca40127 (patch)
treef6acf6d223307606e52f06fa971f31fa842f3f09 /server-beta/src
parent33fd161778557ab8f3a511b544d5416b6b8285bd (diff)
downloadlua-language-server-51cb6529d23b01586a60c2a015f22dd1eca40127.zip
更新
Diffstat (limited to 'server-beta/src')
-rw-r--r--server-beta/src/searcher/eachRef.lua20
1 files changed, 20 insertions, 0 deletions
diff --git a/server-beta/src/searcher/eachRef.lua b/server-beta/src/searcher/eachRef.lua
index 81bfb8bf..65fd3529 100644
--- a/server-beta/src/searcher/eachRef.lua
+++ b/server-beta/src/searcher/eachRef.lua
@@ -120,6 +120,22 @@ local function ofLiteral(searcher, source, callback)
end
end
+local function ofGoTo(searcher, source, callback)
+ local name = source[1]
+ local label = guide.getLabel(source, name)
+ if label then
+ callback {
+ searcher = searcher,
+ source = label,
+ mode = 'set',
+ }
+ end
+end
+
+local function ofLabel(searcher, source, callback)
+
+end
+
return function (searcher, source, callback)
local stype = source.type
if stype == 'local' then
@@ -138,5 +154,9 @@ return function (searcher, source, callback)
or stype == 'boolean'
or stype == 'string' then
ofLiteral(searcher, source, callback)
+ elseif stype == 'goto' then
+ ofGoTo(searcher, source, callback)
+ elseif stype == 'label' then
+ ofLabel(searcher, source, callback)
end
end