lua-users home
lua-l archive

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


Hmm...  I wonder how hard it would be to change the parser so that when a table is being indexed with . or : it acts similar to other languages (such as ruby) and interprets everything after the . or : up to the first bit of white space explicitly as a name.  In ruby (and probably python) something.and is legal.

This might be a nice feature for the next release...

Mike

On Wed, Jan 7, 2009 at 9:32 AM, Joseph Stewart <joseph.stewart@gmail.com> wrote:
Check http://www.lua.org/manual/5.1/manual.html#2 (2.1 Lexical Conventions).


On Wed, Jan 7, 2009 at 9:27 AM, Mike Panetta <panetta.mike@gmail.com> wrote:
Even when used as part of a table (index) name?  Other languages allow this I think.  I know python and ruby support using and, or, etc instead of &&, || etc.  Ill have to try it and see.

Mike.


On Wed, Jan 7, 2009 at 9:24 AM, Joseph Stewart <joseph.stewart@gmail.com> wrote:
Because "not", "and", "or" are lua keywords and cannot be used as symbols.