Files
nel/nellie/init.lua
2026-03-08 18:59:45 +00:00

27 lines
633 B
Lua

local path = ...
require("nellie.proto")
function Run(args)
-- Take arguments as neli files to read and interpret
local root = Chain(
string.format(
"in cmd 'nelli {%s}'",
table.concat(args,";")
)
)
for _,parameter in pairs(args) do
local chain = Chain(
string.format("in 'call: root' @'%s'",parameter)
):from(root)
root:call(function()
local root = Parse(
read(parameter),
parameter,
chain
)
for _,expression in pairs(root.items) do
NelliScope:run(expression,Chain(expression:link("root: do")):from(chain))
end
end)
end
end