summaryrefslogtreecommitdiff
path: root/script/vm/local-id.lua
blob: f19e85e681622b504c43c8a2098e1f7e4c8c4cf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
local util = require 'utility'

---@class parser.object
---@field _localID string

local compileMap = util.switch()
    : getMap()

local m = {}

m.ID_SPLITE = '\x1F'

function m.getID(source)
    local compiler = compileMap[source.type]
    if compiler then
        return compiler(source)
    end
    return false
end

return m