summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-26 10:03:40 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-26 10:03:40 +0800
commit02c05d770711b0d1edc3cb42a74fe6d03214903c (patch)
treea0b0029ea6a7c35835dca8f919349f67dbd11a0f /server
parentb24f10ffeab4c9298f17a4b51aa67f29f3b29a0d (diff)
parent9c1b6cd37da1224e6202c0e2849f97b22426fadc (diff)
downloadlua-language-server-02c05d770711b0d1edc3cb42a74fe6d03214903c.zip
Merge branch 'master' of https://github.com/sumneko/lua-language-server
Diffstat (limited to 'server')
-rw-r--r--server/src/vm/vm.lua5
-rw-r--r--server/test/references/init.lua6
2 files changed, 11 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
diff --git a/server/test/references/init.lua b/server/test/references/init.lua
index 6a8b42db..c512ca5d 100644
--- a/server/test/references/init.lua
+++ b/server/test/references/init.lua
@@ -94,3 +94,9 @@ end
local <!f2!> = f()
]]
+
+TEST [[
+table.<!dump!>()
+function table.<?dump?>()
+end
+]]