lua-users home
lua-l archive

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


>Apparently this only applies for identifiers, not reserved words, so that
>    x.break
>is illegal, and NOT the same as
>    x["break"]

>Thoughts anyone?

I think it would suffice to have x. accept a LITERAL, and not just NAMES.

Then one could use:

x.valid
x."break"
x."if"

Etc.
Some scripting languages use this approach.

+Thiago Bastos