1
0
mirror of https://github.com/Adorable-Catgirl/LuaComp.git synced 2024-11-12 21:18:05 +11:00
Mirror of LuaComp
Go to file
2023-08-02 12:55:41 -04:00
completion/zsh whoops 2019-12-15 13:01:16 -05:00
examples experimental relative include 2022-02-14 21:48:54 -05:00
libpreproc@af74760d61 luacomp3 maybe? 2023-08-02 12:55:41 -04:00
luacomp3 luacomp3 maybe? 2023-08-02 12:55:41 -04:00
manual okay, we good now. i think. 2019-12-14 17:16:32 -05:00
src experimental relative include 2022-02-14 21:48:54 -05:00
tests Pragma, libluacomp 2021-06-28 11:00:15 -05:00
.gitignore fixed escape related regression 2021-06-25 10:49:40 -05:00
.gitmodules luacomp3 maybe? 2023-08-02 12:55:41 -04:00
LICENSE you got a loicense for that 2021-06-25 11:06:38 -05:00
make_release.lua Pragma, libluacomp 2021-06-28 11:00:15 -05:00
README.md okay, we good now. i think. 2019-12-14 17:16:32 -05:00

LuaComp

A general purpose preprocessor and postprocessor written in Lua.

Building

See manual/README.md

How-To

Merging source files

-- myfile.lua
local my_lib = {}

function my_lib.hello_world()
  print("Hello, world!")
end
-- main.lua
--#include "my_file.lua"
my_lib.hello_world()

Getting enviroment variables

print("This was compiled in the shell "..$(SHELL))

Macros

@[[function my_macro(a, b)]]
print("Hello, @[{a}]. Your lucky number is @[{b}].")
@[[end]]

@[[my_macro("world", 7)]]
@[[my_macro("user", 42)]]
@[[my_macro("Earth", 0)]]
@[[my_macro("Satna", 666)]]