lua-users home
lua-l archive

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


On Mon, Jul 5, 2010 at 15:55, Vyacheslav Egorov <mister.aleph@gmail.com> wrote:
> When I was writing utility scripts in Lua I quickly became annoyed by lack
> of variable expansion mechanism.
> So the first thing I introduced was a function expand which (just as it name
> suggests) expanded $-prefixed variables inside given string. It relied on
> debug functions to look for variables inside caller frame.

Is it much different from the code here?

http://lua-users.org/wiki/StringInterpolation (see "Hack: Using debug
to Access Lexicals" section).

If so, can you share the code? :-)

Alexander.