summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-29 16:59:28 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-29 16:59:28 +0800
commit1bb6fdc11e9d1fa4be0352c16e5f61fb300b0f19 (patch)
tree88d90e590816f221dbdc815c9201acc2af8332fd
parentb2ba3b729ef376b933381fdfdc53c1cb0b948e0e (diff)
downloadlua-language-server-1bb6fdc11e9d1fa4be0352c16e5f61fb300b0f19.zip
不可以将index的field导出
-rw-r--r--server/src/core/vm.lua10
1 files changed, 4 insertions, 6 deletions
diff --git a/server/src/core/vm.lua b/server/src/core/vm.lua
index c2ca89a0..b7ae4055 100644
--- a/server/src/core/vm.lua
+++ b/server/src/core/vm.lua
@@ -943,14 +943,12 @@ function mt:getSimple(simple, mode)
obj.indexName = parentName
local index = self:getIndex(child)
if mode == 'value' or i < #simple then
- field = self:getField(value, index, child) or self:createField(value, index, child)
- field.parentValue = value
- value = self:getValue(field)
+ local indexField = self:getField(value, index, child) or self:createField(value, index, child)
+ value = self:getValue(indexField)
self:addInfo(field, 'get', obj)
else
- field = self:createField(value, index, child)
- field.parentValue = value
- value = self:getValue(field)
+ local indexField = self:createField(value, index, child)
+ value = self:getValue(indexField)
end
if obj[1].type == 'string' then
parentName = ('%s[%q]'):format(parentName, index)