lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

David Given <> wrote:
> All my Lua files tend to start with the same boilerplate containing
> lists of:
> local string_find = string.find
> local table_insert = table.insert
> local print = print
> ...etc. It would be really nice to be able to common this somehow.

I agree. Lexical is all nice and well but sometimes a textual approach
is simply more sensible.

So I adapted and enhanced a macro package originally written by steve d.
Among other things this supports an __INCLUDE(filename) macro. There is
a version for Lua* here (includes full source):

* Runs on standard Lua, but requires lhf's token filter compiled in.


cheers  thomasl