diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-03-18 16:23:16 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-03-18 16:23:16 +0800 |
commit | 357e62b68d67c4218d95f6bee937e6d5e206d752 (patch) | |
tree | d53917e3e64b7f252fcb54116c9e5609fe380805 /server/src/vm/vm.lua | |
parent | de4cec30d4befc0de4bd264c16c52c1a575cd5d3 (diff) | |
download | lua-language-server-357e62b68d67c4218d95f6bee937e6d5e206d752.zip |
重构文件符号
Diffstat (limited to 'server/src/vm/vm.lua')
-rw-r--r-- | server/src/vm/vm.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/vm/vm.lua b/server/src/vm/vm.lua index 093122e4..9fcd57ae 100644 --- a/server/src/vm/vm.lua +++ b/server/src/vm/vm.lua @@ -40,6 +40,7 @@ function mt:buildTable(source) if obj.type == 'pair' then local value = self:getFirstInMulti(self:getExp(obj[2])) local key = obj[1] + self:instantSource(obj) self:instantSource(key) key:bindValue(value, 'set') if key.index then @@ -794,6 +795,7 @@ function mt:doSet(action) if not action[2] then return end + self:instantSource(action) -- 要先计算值 local vars = action[1] local exps = action[2] @@ -814,6 +816,7 @@ function mt:doSet(action) end function mt:doLocal(action) + self:instantSource(action) local vars = action[1] local exps = action[2] local values @@ -966,7 +969,6 @@ function mt:doLocalFunction(action) local func = self:buildFunction(action) func:addInfo('local', name) loc:setValue(func) - loc:setInitValue(func) end end end |