diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-25 19:30:47 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-25 19:30:47 +0800 |
commit | 9c1b6cd37da1224e6202c0e2849f97b22426fadc (patch) | |
tree | f0de28a87189c968d6ca33503e4b84f68ee1d12b /server/src/vm/vm.lua | |
parent | acf3e53057a29a94361b8406a98572d32828e366 (diff) | |
download | lua-language-server-9c1b6cd37da1224e6202c0e2849f97b22426fadc.zip |
修正在函数定义处可能无法搜索到所有引用的bug
Diffstat (limited to 'server/src/vm/vm.lua')
-rw-r--r-- | server/src/vm/vm.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua index 0f0de9fe..b5ffa459 100644 --- a/server/src/vm/vm.lua +++ b/server/src/vm/vm.lua @@ -926,9 +926,11 @@ function mt:doFunction(action) if source.type == 'index' then local index = self:getIndex(source) parent:setChild(index, value, source[1]) + parent:addInfo('set child', source, index) elseif source.type == 'name' then local index = source[1] parent:setChild(index, value, source) + parent:addInfo('set child', source, index) end source:bindValue(value, 'set') @@ -948,12 +950,15 @@ function mt:doFunction(action) local value = self:buildFunction(action) local source = name[#name] self:instantSource(source) + source:set('parent', parent) if source.type == 'index' then local index = self:getIndex(source) parent:setChild(index, value, source[1]) + parent:addInfo('set child', source, index) elseif source.type == 'name' then local index = source[1] parent:setChild(index, value, source) + parent:addInfo('set child', source, index) end source:bindValue(value, 'set') end |