lua-users home
lua-l archive

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


On Thu, Feb 08, 2007 at 08:58:07AM -0200, Luiz Henrique de Figueiredo wrote:
> > It doesn't prevent non-config-file-like behavior, like
> > "x = function() ... end();"
Oops.  This should have been "x = (function() ... end)();".
> 
> This may be config-file-like behavior, yes, who knows?
> Perhaps the app allows the user to set callbacks.

I meant that in response to:

> This will allow (and restrict) config files to be a series assignments.

meaning to say that while it does restrict the syntax, it doesn't
restrict the behavior, which just encourages uglier syntax to get
unrestricted syntax back.

> (echo 'return {'; cat $*; echo '}') | luac -
> 
> But, yes, I'm pushing it for no reason :-)

Then you have to special-case compiled Lua source in your app, to not
add this stuff at runtime.  :)

-- 
Glenn Maynard