summaryrefslogtreecommitdiff
path: root/script/vm/library.lua
blob: e7bf4f421306ba2595daeee1c81165f812057143 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
---@class vm
local vm      = require 'vm.vm'

function vm.getLibraryName(source)
    if source.special then
        return source.special
    end
    local defs = vm.getDefs(source)
    for _, def in ipairs(defs) do
        if def.special then
            return def.special
        end
    end
    return nil
end