summaryrefslogtreecommitdiff
path: root/server/src/core/definition.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-13 18:03:24 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-13 18:03:24 +0800
commit2614c2f6e6a53e4142fe57a184fd7bead11a5f4f (patch)
tree17bd6669b19ac260bed90a9dfea241e4117074ff /server/src/core/definition.lua
parent628a272b7babbeab995cf582ff4337b897ac09e6 (diff)
downloadlua-language-server-2614c2f6e6a53e4142fe57a184fd7bead11a5f4f.zip
解除所有的source循环引用
Diffstat (limited to 'server/src/core/definition.lua')
-rw-r--r--server/src/core/definition.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/server/src/core/definition.lua b/server/src/core/definition.lua
index b7aadb44..27c6f8eb 100644
--- a/server/src/core/definition.lua
+++ b/server/src/core/definition.lua
@@ -100,8 +100,8 @@ local function parseLocal(vm, source, lsp)
end
local positions = {}
positions[#positions+1] = {
- loc.source.start,
- loc.source.finish,
+ loc:getSource().start,
+ loc:getSource().finish,
}
if #positions == 0 then
return nil
@@ -131,11 +131,11 @@ end
local function parseLabel(vm, label, lsp)
local positions = {}
- label:eachInfo(function (info)
+ label:eachInfo(function (info, src)
if info.type == 'set' then
positions[#positions+1] = {
- info.source.start,
- info.source.finish,
+ src.start,
+ src.finish,
}
end
end)