Attached is a set of token tuning tools, and some
tune-ups, to give your Lua a flashy, almost
syntax-over-sugary look.
I don't promise furry backseats, no built-in XBox
360, but
almost. :)
Requirements:
Lua 5.1 with token filter patch applied (not
included)
Ignition:
make LUA=path-to-your-modded/lua
Tested on:
OS X 10.4 (but there's nothing system
specific)
Gains:
? cond { true_choice, false_choice } -->
_G['?'](cond){ true_choice, false_choice }
#... -> select('#',...)
...[n] -> (select(n,...))
exp += -> exp = exp +
exp -= -> exp = exp -
exp *= -> exp = exp *
exp /= -> exp = exp /
exp ..= -> exp = exp ..
tbl.until (and other reserved words:
function, repeat, nil, false, true)
{|, until=
obj:until
=|,|(|{ do -> =|,|(|{ function()
The important part really is the ftools.lua, which
allows
multiple filters to co-operate, without need to know
of
each other. As to my knowledge, this hasn't been
possible
earlier.
-asko