summaryrefslogtreecommitdiff
path: root/server/src/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-22 11:24:37 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-22 11:24:37 +0800
commit5b584a6f9607221db888ed5ccbb93809006f2746 (patch)
tree243c60a2284f8c75dee8e7ec1166dac0665357a8 /server/src/core
parentc0cb126d73007c618e2887776a04f94882ad6021 (diff)
downloadlua-language-server-5b584a6f9607221db888ed5ccbb93809006f2746.zip
去掉一个冗余标记
Diffstat (limited to 'server/src/core')
-rw-r--r--server/src/core/definition.lua15
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