lua-users home
lua-l archive

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

On Sun 16 Jun, Reuben Thomas wrote:
> > I was under the impression that the syntactic sugar of t.x for
> > t["x"] , and x = for ["x"] = inside a table constructor, worked
> > whenever x was replaced by a string that was a valid lua identifier. 
> > It appears to work, for example, in both Lua 4.0 and 5.0(w0) if "x"
> > is replaced by "print".
> I believe that's true.
> > However, it appears not to work if "x" is replaced by "nil".
> "nil" isn't a valid identifier, it's a keyword.

Doh! I realized this seconds after posting my mail. Would
it seriously complicate the parser to allow keywords as
indices for the sugared notation?

Gavin Wraith (
Home page: