1
0
mirror of https://github.com/Adorable-Catgirl/LuaComp.git synced 2024-11-23 02:18:06 +11:00
Mirror of LuaComp
Go to file
Jane Roxanne ed6f0a227b wot
2020-03-18 13:09:25 -05:00
completion/zsh whoops 2019-12-15 13:01:16 -05:00
examples okay, we good now. i think. 2019-12-14 17:16:32 -05:00
manual okay, we good now. i think. 2019-12-14 17:16:32 -05:00
src I have no clue what I've done so far. 2020-03-18 13:08:15 -05:00
.gitignore Neat, it works. I think. 2019-11-05 14:47:42 -05:00
application.lua I have no clue what I've done so far. 2020-03-18 13:08:15 -05:00
LICENSE Update LICENSE 2019-11-04 23:43:12 -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)]]