lua-users home
lua-l archive

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


On Tue, May 7, 2013 at 10:04 PM, John Dunn <John_Dunn@qscaudio.com> wrote:
> The old patches don't apply at all to 5.2.1 so I'm wondering if anyone has patched Lua to add these operators. If not, would it be fairly straight for me to modify the source to add these myself?

It shouldn't be difficult to roll it out yourself. With little C
experience, I was able to add a short lambda syntax a few years ago...

The code is clean and well structured, if terse. You just have to
imitate what's already in place for the new operators in the
lexer/parser and the new VM instructions (which would include number
handling and metamethod dispatch).

You may take some hints from the existing patch as well, v5.2 is still
similar to v5.1 in a lot of respects.

-- Pierre-Yves