From cb4f641884ae6104f44967949f9b52a9a72f7baf Mon Sep 17 00:00:00 2001 From: sanine Date: Tue, 4 Jan 2022 00:28:38 -0600 Subject: write first-pass main lua script --- src/lua-script/cify.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 src/lua-script/cify.lua (limited to 'src/lua-script/cify.lua') diff --git a/src/lua-script/cify.lua b/src/lua-script/cify.lua new file mode 100644 index 0000000..153feb3 --- /dev/null +++ b/src/lua-script/cify.lua @@ -0,0 +1,13 @@ +-- "C"-ify a lua program + +output_file = io.open(arg[2], 'w') + + +output_file:write('const char *argent_script =\n') + +for line in io.lines(arg[1]) do + output_file:write(' "'..line..'\\n"\n') +end + +output_file:write(';') +output_file:close() -- cgit v1.2.1