11 lines
216 B
Lua
Raw Normal View History

2023-03-07 21:52:29 +08:00
local M = {}
2023-03-08 11:53:41 +08:00
M.__index = function(t, k)
local res, engine = pcall(require, [[Trans.backend.]] .. k)
assert(res, [[No such Backend: ]] .. k)
t[k] = engine
2023-03-07 21:52:29 +08:00
return engine
end
return setmetatable(M, M)