[][src]Macro tealr::compile_inline_teal

compile_inline_teal!() { /* proc-macro */ }

Compiles the given teal code at compile time to lua.

The macro tries it best to pass the correct --include-dir to tl using CARGO_MANIFEST_DIR. However, this isn't always where you want it to be. In that case you can add an extra argument that will be joined with CARGO_MANIFEST_DIR using std::path::PathBuf::join

Compile time requirement!

At this point in time this requires you to have the teal compiler installed and accessible as tl.

Example

assert_eq!(compile_inline_teal!("local a : number = 1\n"),"local a = 1\n")