summaryrefslogtreecommitdiff
path: root/server-beta/src/core/hover/name.lua
blob: d0caf885806083fac6bb872a0f4369fe5582f0dc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local function asLocal(source)
    return source[1]
end

return function (source)
    local parent = source.parent
    if not parent then
        return ''
    end
    if parent.type == 'local'
    or parent.type == 'getlocal'
    or parent.type == 'setlocal' then
        return asLocal(parent)
    end
    return ''
end