[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Is "scripting" truly Lua's future?
- From: Thomas Lauer <thomas.lauer@...>
- Date: Mon, 15 Sep 2008 17:34:07 +0100
David Given <email@example.com> 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.