summaryrefslogtreecommitdiff
path: root/server-beta/src/searcher/eachField.lua
blob: c55902ff4cc00b829bce9bac088dd562c6b54b0e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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