From 3852514816cd4d154b55f573e2eb8ca6fd86ec8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Tue, 26 Feb 2019 15:31:06 +0800 Subject: =?UTF-8?q?field=E7=9A=84=E5=AF=BB=E6=89=BE=E5=AE=9A=E4=B9=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/definition.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'server/src/core/definition.lua') 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) -- cgit v1.2.3