lua-users home
lua-l archive

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


Hi,
I don't know too much about lua internals and I was wondering how to add a
new keyword called 'method' in order to declare methods inside a table in
this way:

table = { foo = method( ) ... end }

instead of:

table = { foo = function( self ) ... end }

Has somebody tried this? would it very hard to add?
I think that probably the easiest way to do that would be adding a code
preprocesor. With this idea in mind I thought that it would be cool to have
a customizable or plugable code preprocessor in lua, so that the users could
customize their sintax. What do you think about that?


Ignacio Castaño
castano@asidesoft.com


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com