lua-users home
lua-l archive

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


On Fri, 21 Oct 2011 10:58:35 +0200, steve donovan wrote:

That's exactly it, 1 is not a valid identifier, so you cannot use the
sugar that says that t.x == t["x"].

Actually that's really the problem for me, rather than what is allowed
in identifiers.

    ('t.x == t["x"]'):gsub('x','1')
    -- => 't.1 == t["1"]', not 't.1 == t[1]'