lua-users home
lua-l archive

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



local t1 = {
    v1 = v2 = v3 = 10
}

I'd think this would be doable with a small lparser.c diff, provided that you limited it to the string-key shorthand.

A more general patch, allowing things like: {  [a(b) ]= [a] = 10 }, would be harder to write -- but probably not that useful.  

If you're itching to give it a shot -- take a look at lparser.c:recfield().  Your entry point is probably a testnext(ls,'='), inserted immediately before the OP_SETTABLE gets committed.

-Sven