summaryrefslogtreecommitdiff
path: root/server/src/core/definition.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-02-26 15:31:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-02-26 15:31:06 +0800
commit3852514816cd4d154b55f573e2eb8ca6fd86ec8f (patch)
tree79a04a2a0cf5cc7af2127626733625dbe28e88a9 /server/src/core/definition.lua
parent94a9de07f5042e18927ce996f151c846fca432f9 (diff)
downloadlua-language-server-3852514816cd4d154b55f573e2eb8ca6fd86ec8f.zip
field的寻找定义
Diffstat (limited to 'server/src/core/definition.lua')
-rw-r--r--server/src/core/definition.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua
index e4af5d16..21fd7f96 100644
--- a/server/src/core/definition.lua
+++ b/server/src/core/definition.lua
@@ -126,7 +126,16 @@ local function parseResultAsVar(vm, result, lsp)
end
local function parseValue(vm, value, lsp)
-
+ local positions = {}
+ value:eachInfo(function (info)
+ if info.type == 'set' then
+ positions[#positions+1] = {
+ info.source.start,
+ info.source.finish,
+ }
+ end
+ end)
+ return positions
end
return function (vm, source, lsp)