summaryrefslogtreecommitdiff
path: root/server-beta/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-09 15:36:11 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-09 15:36:11 +0800
commit6249aedf9464c91f3578d5b50784a8b749391ada (patch)
tree95572ef31cf48f0f577c5bb32acf5fd311727ee8 /server-beta/src
parent2724d8838b422e3712f96f9a21243f3b9235f3f8 (diff)
downloadlua-language-server-6249aedf9464c91f3578d5b50784a8b749391ada.zip
支持method中的self
Diffstat (limited to 'server-beta/src')
-rw-r--r--server-beta/src/core/engineer.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/server-beta/src/core/engineer.lua b/server-beta/src/core/engineer.lua
index 97101235..be64a66c 100644
--- a/server-beta/src/core/engineer.lua
+++ b/server-beta/src/core/engineer.lua
@@ -27,7 +27,7 @@ mt['local'] = function (self, source, mode, callback)
if source.tag == 'self' then
local method = source.method
local node = method.node
- self:search(node, node.type, mode, callback)
+ self:eachRef(node, mode, callback)
end
elseif mode == 'ref' then
if source.tag ~= 'self' then
@@ -45,7 +45,7 @@ mt['local'] = function (self, source, mode, callback)
if source.tag == 'self' then
local method = source.method
local node = method.node
- self:search(node, node.type, mode, callback)
+ self:eachRef(node, mode, callback)
end
elseif mode == 'field' then
if source.ref then
@@ -66,6 +66,11 @@ mt['local'] = function (self, source, mode, callback)
end
end
end
+ if source.tag == 'self' then
+ local method = source.method
+ local node = method.node
+ self:eachRef(node, 'field', callback)
+ end
if source.value then
self:eachRef(source.value, 'field', callback)
end