Mirror of LuaComp
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Sam 81fdcb064b luacomp3 maybe? 4 months ago
completion/zsh whoops 4 years ago
examples experimental relative include 2 years ago
libpreproc@af74760d61 luacomp3 maybe? 4 months ago
luacomp3 luacomp3 maybe? 4 months ago
manual okay, we good now. i think. 4 years ago
src experimental relative include 2 years ago
tests Pragma, libluacomp 2 years ago
.gitignore fixed escape related regression 2 years ago
.gitmodules luacomp3 maybe? 4 months ago
LICENSE you got a loicense for that 2 years ago
README.md okay, we good now. i think. 4 years ago
make_release.lua Pragma, libluacomp 2 years ago

README.md

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)]]