summaryrefslogtreecommitdiff
path: root/server/src/vm
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-03-05 11:40:52 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-03-05 11:40:52 +0800
commit750dc445ea6f0d9010b73f9a8b884e6ca55dfb26 (patch)
tree5432aab152eb5b4014055813b3184feabeca8f04 /server/src/vm
parentcf035623c1e0f6148cd4cee513ce25810d0d137e (diff)
downloadlua-language-server-750dc445ea6f0d9010b73f9a8b884e6ca55dfb26.zip
find_lib
Diffstat (limited to 'server/src/vm')
-rw-r--r--server/src/vm/vm.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua
index 2c9e7828..3ab10630 100644
--- a/server/src/vm/vm.lua
+++ b/server/src/vm/vm.lua
@@ -456,6 +456,7 @@ function mt:getSimple(simple, max)
if object then
table.insert(args, 1, object)
end
+ object = nil
source:bindCall(func, args)
value = self:call(func, args, source) or createValue('any')
elseif source.type == 'index' then
@@ -464,6 +465,8 @@ function mt:getSimple(simple, max)
value = value:getChild(index) or value:setChild(index, createValue('any', source))
source:bindValue(value, 'get')
elseif source.type == 'name' then
+ source:setFlag('parent', value)
+ source:setFlag('object', object)
value = value:getChild(source[1]) or value:setChild(source[1], createValue('any', source))
source:bindValue(value, 'get')
elseif source.type == ':' then