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.lua19
1 files changed, 19 insertions, 0 deletions
diff --git a/server-beta/src/searcher/eachField.lua b/server-beta/src/searcher/eachField.lua
new file mode 100644
index 00000000..c55902ff
--- /dev/null
+++ b/server-beta/src/searcher/eachField.lua
@@ -0,0 +1,19 @@
+local function ofLocal(seacher, source, callback)
+ if source.ref then
+ for _, ref in ipairs(source.ref) do
+ if ref.type == 'getlocal' then
+ local parent = ref.parent
+
+ end
+ end
+ end
+end
+
+return function (seacher, source, callback)
+ if source.type == 'local' then
+ ofLocal(seacher, source, callback)
+ elseif source.type == 'getlocal'
+ or source.type == 'setlocal' then
+ ofLocal(seacher, source.node, callback)
+ end
+end