melee-roguelite/main.lua

23 lines
692 B
Lua
Raw Normal View History

2018-10-17 18:32:39 -07:00
-- bootstrap the compiler
fennel = require("lib.fennel")
table.insert(package.loaders, fennel.make_searcher({correlate=true}))
pp = function(x) print(fennel.view(x)) end
2018-10-17 18:32:39 -07:00
lume = require("lib.lume")
local make_love_searcher = function(env)
return function(module_name)
local path = module_name:gsub("%.", "/") .. ".fnl"
if love.filesystem.getInfo(path) then
return function(...)
local code = love.filesystem.read(path)
return fennel.eval(code, {env=env}, ...)
end, path
end
end
end
table.insert(package.loaders, make_love_searcher(_G))
table.insert(fennel["macro-searchers"], make_love_searcher("_COMPILER"))
2018-10-17 18:32:39 -07:00
require("wrap")