diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-22 11:24:37 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-22 11:24:37 +0800 |
commit | 5b584a6f9607221db888ed5ccbb93809006f2746 (patch) | |
tree | 243c60a2284f8c75dee8e7ec1166dac0665357a8 /server/src/core | |
parent | c0cb126d73007c618e2887776a04f94882ad6021 (diff) | |
download | lua-language-server-5b584a6f9607221db888ed5ccbb93809006f2746.zip |
去掉一个冗余标记
Diffstat (limited to 'server/src/core')
-rw-r--r-- | server/src/core/definition.lua | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua index 9b4b7233..b348a386 100644 --- a/server/src/core/definition.lua +++ b/server/src/core/definition.lua @@ -95,11 +95,12 @@ end local function parseLocal(vm, source, lsp) local positions = {} local loc = source:bindLocal() - if loc:get 'arg' then + local locSource = loc:getSource() + if locSource:get 'arg' then positions[#positions+1] = { - loc:get 'arg'.start, - loc:get 'arg'.finish, - loc:get 'arg':getUri(), + locSource.start, + locSource.finish, + locSource:getUri(), } return positions end @@ -108,9 +109,9 @@ local function parseLocal(vm, source, lsp) return parseValueCrossFile(vm, source, lsp) end positions[#positions+1] = { - loc:getSource().start, - loc:getSource().finish, - loc:getSource():getUri(), + locSource.start, + locSource.finish, + locSource:getUri(), } if #positions == 0 then return nil |