14 lines
223 B
Lua
Raw Normal View History

2023-03-07 21:52:29 +08:00
local M = {}
M.__index = function(tbl, k)
local res, engine = pcall(require, 'Trans.backend.' .. k)
assert(res, [[Can't Found Engine:]] .. k)
tbl[k] = engine
return engine
end
return setmetatable(M, M)