1
Fork 0
satellite/dotfiles/neovim/lua/my/plugins/moonwalk.lua
2022-12-26 20:07:10 +01:00

21 lines
401 B
Lua

local M = {}
function M.setup()
require("moonwalk").add_loader("tl", function(src, path)
local tl = require("tl")
local errs = {}
local _, program = tl.parse_program(tl.lex(src), errs)
if #errs > 0 then
error(
path .. ":" .. errs[1].y .. ":" .. errs[1].x .. ": " .. errs[1].msg,
0
)
end
return tl.pretty_print_ast(program)
end)
end
return M