lua-users home
lua-l archive

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


> Ok, thanks for the clarification.
> 
> In some cases (metaprogramming comes to mind), it could be useful to
> make the lexical scope (hence the current environment in 5.2)
> available to the evaluated string too.
> 
> Something like loadin(1,"some code"), for example, where 1 is the
> stack level, similar to what the debug lib does (except that you would
> not give access to the 0 level for security reasons).
> 
> Do you think it could be done?

This can be done through the debug API (with a huge overhead).

-- Roberto