lua-users home
lua-l archive

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


foo = {}
foo.do = 1
Returns:
<name> expected near `do'

foo["do"] = 1 works fine.

A similar result occurs for methods:

foo = {}
foo["else"] = function(obj) end
foo:else()
Returns:
<name> expected near `else'

Is it really necessary that the parser complains about the use
of reserved keywords  in case of foo.<keyword> or
foo:<keyword> type syntax?