diff options
author | sanine <sanine.not@pm.me> | 2022-01-04 00:28:38 -0600 |
---|---|---|
committer | sanine <sanine.not@pm.me> | 2022-01-04 00:28:38 -0600 |
commit | cb4f641884ae6104f44967949f9b52a9a72f7baf (patch) | |
tree | 4819c0cc48f18b87d119d9b4bb393ef2bf4fe290 /src/lua-script/cify.lua | |
parent | 5830f684ba172664df43eee26636e99e5a228028 (diff) |
write first-pass main lua script
Diffstat (limited to 'src/lua-script/cify.lua')
-rw-r--r-- | src/lua-script/cify.lua | 13 |
1 files changed, 13 insertions, 0 deletions
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() |