[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: bitwise operators Power Patch for 5.2
- From: Pierre-Yves Gérardy <pygy79@...>
- Date: Tue, 7 May 2013 22:29:55 +0200
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.