diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-25 17:45:55 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-25 17:45:55 +0800 |
commit | 51cb6529d23b01586a60c2a015f22dd1eca40127 (patch) | |
tree | f6acf6d223307606e52f06fa971f31fa842f3f09 /server-beta/src | |
parent | 33fd161778557ab8f3a511b544d5416b6b8285bd (diff) | |
download | lua-language-server-51cb6529d23b01586a60c2a015f22dd1eca40127.zip |
更新
Diffstat (limited to 'server-beta/src')
-rw-r--r-- | server-beta/src/searcher/eachRef.lua | 20 |
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 |