diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-13 17:18:32 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-13 17:18:32 +0800 |
commit | 628a272b7babbeab995cf582ff4337b897ac09e6 (patch) | |
tree | de859adf802e7ea941cf990007e40d98a1fee77b /server/src/core/references.lua | |
parent | 42ec4d53d770a053c0909f14b5aa7c8cd42bbcdb (diff) | |
download | lua-language-server-628a272b7babbeab995cf582ff4337b897ac09e6.zip |
解除value->info->source的循环引用
Diffstat (limited to 'server/src/core/references.lua')
-rw-r--r-- | server/src/core/references.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/server/src/core/references.lua b/server/src/core/references.lua index 2cc14abb..0f9c73ab 100644 --- a/server/src/core/references.lua +++ b/server/src/core/references.lua @@ -16,24 +16,24 @@ local function parseResult(vm, source, declarat, callback) callback(info.source) end end) - loc:getValue():eachInfo(function (info) + loc:getValue():eachInfo(function (info, src) if declarat or info.type == 'get' then - callback(info.source) + callback(src) end end) return end if source:bindValue() then - source:bindValue():eachInfo(function (info) + source:bindValue():eachInfo(function (info, src) if declarat or info.type == 'get' then - callback(info.source) + callback(src) end end) local parent = source:get 'parent' - parent:eachInfo(function (info) + parent:eachInfo(function (info, src) if info[1] == source[1] then if (declarat and info.type == 'set child') or info.type == 'get child' then - callback(info.source) + callback(src) end end end) |