diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-09-30 10:55:59 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-09-30 10:55:59 +0800 |
commit | c4eb4df1a64c595ebcba9b1f2f01d626e447c8d6 (patch) | |
tree | edf4a5d33361d989b15c9ed8884dadba0522434d /server-beta/src/core | |
parent | e02e98690dec2fd355a5a59af6b87cb2d94ed8b1 (diff) | |
download | lua-language-server-c4eb4df1a64c595ebcba9b1f2f01d626e447c8d6.zip |
更新field
Diffstat (limited to 'server-beta/src/core')
-rw-r--r-- | server-beta/src/core/engineer.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/server-beta/src/core/engineer.lua b/server-beta/src/core/engineer.lua index 0def3ff1..dc3fd721 100644 --- a/server-beta/src/core/engineer.lua +++ b/server-beta/src/core/engineer.lua @@ -29,12 +29,11 @@ end --- 查找所有域的引用 function mt:eachRefAsField(obj, callback) local node = obj.node - guide.eachFieldOf(node, guide.getKeyName(obj), function (value) - local tp = value.type - if tp == 'setglobal' or tp == 'setfield' then - callback(value, 'set') - elseif tp == 'getglobal' or tp == 'getfield' then - callback(value, 'get') + guide.eachRef(node, function (ref) + if ref.type == 'setglobal' or ref.type == 'setfield' then + callback(ref, 'set') + elseif ref.type == 'getglobal' or ref.type == 'getfield' then + callback(ref, 'get') end end) end |