summaryrefslogtreecommitdiff
path: root/server-beta/src/searcher/getField.lua
blob: 59ae462c15321b829e6f3136b54dca7eda15ac98 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
return function (searcher, source)
    local stype = source.type
    if     stype == 'getfield'
    or     stype == 'setfield' then
        return source.field
    elseif stype == 'getmethod'
    or     stype == 'setmethod' then
        return source.method
    elseif stype == 'getindex'
    or     stype == 'setindex' then
        return source.index
    end
    return nil
end