diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-21 14:02:05 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-21 14:02:05 +0800 |
commit | 5914857908ea6df3fbf423c83227c9595e779b20 (patch) | |
tree | d18d0304bc9008a26a217f7a9d2d97319754a146 /server/src/core | |
parent | 999f261b32d8e7433548c818039e38c83b3e2ef8 (diff) | |
download | lua-language-server-5914857908ea6df3fbf423c83227c9595e779b20.zip |
加个测试
Diffstat (limited to 'server/src/core')
-rw-r--r-- | server/src/core/definition.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua index e240e614..341a363f 100644 --- a/server/src/core/definition.lua +++ b/server/src/core/definition.lua @@ -93,12 +93,20 @@ local function parseValueCrossFile(vm, source, lsp) end local function parseLocal(vm, source, lsp) + local positions = {} local loc = source:bindLocal() + if loc:get 'arg' then + positions[#positions+1] = { + loc:get 'arg'.start, + loc:get 'arg'.finish, + loc:get 'arg':getUri(), + } + return positions + end local value = source:bindValue() if value.uri ~= '' and value.uri ~= vm.uri then return parseValueCrossFile(vm, source, lsp) end - local positions = {} positions[#positions+1] = { loc:getSource().start, loc:getSource().finish, |