summaryrefslogtreecommitdiff
path: root/server-beta/src/searcher/eachField.lua
diff options
context:
space:
mode:
Diffstat (limited to 'server-beta/src/searcher/eachField.lua')
-rw-r--r--server-beta/src/searcher/eachField.lua16
1 files changed, 14 insertions, 2 deletions
diff --git a/server-beta/src/searcher/eachField.lua b/server-beta/src/searcher/eachField.lua
index c55902ff..c40d78eb 100644
--- a/server-beta/src/searcher/eachField.lua
+++ b/server-beta/src/searcher/eachField.lua
@@ -1,9 +1,21 @@
local function ofLocal(seacher, source, callback)
if source.ref then
for _, ref in ipairs(source.ref) do
- if ref.type == 'getlocal' then
+ if ref.type == 'getlocal' then
local parent = ref.parent
-
+ local field = seacher:getField(parent)
+ if field then
+ callback {
+ seacher = seacher,
+ source = field,
+ }
+ end
+ elseif ref.type == 'getglobal'
+ or ref.type == 'setglobal' then
+ callback {
+ seacher = seacher,
+ source = ref,
+ }
end
end
end