lua-users home
lua-l archive

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




2010/12/6 steve donovan <steve.j.donovan@gmail.com>
On Mon, Dec 6, 2010 at 4:41 AM, starwing <weasley.wx@gmail.com> wrote:
> {
>     function OnClick(evt)
>         print("we are clicked")
>     end
> }

It's come up a couple of times but I can't find it in the archives.
It makes sense for a particular kind of object-oriented style (but you
will still have to remember the comma or the semi-colon after the
function)

can table omit it comma or semi-colon?

local t = {1 2 3 4}

just read a expr() and a optional comma/semi-colon is not diffcult in grammar.
 
Out of interest, would this be a major change to the grammar?

just change the parser to support it, maybe I can work a patch out. but I just want to know anybody interest it :-)
 
steve d.