lua-users home
lua-l archive

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


Thx I'll check it out!


On Sun, Nov 4, 2012 at 3:04 PM, Gavin Wraith <gavin@wra1th.plus.com> wrote:
In message <CAMb+DaWHZR5YN+LO6S=_kg8w+VBawPL0suwQ9mfe8MQ-iD_9Sw@mail.gmail.com>
you wrote:


>    2. How difficult is it to extend Lua to support new binary operators?
>    Beyond defining the symbol, the associated metamethod name, the precedence
>    relative to other operators, and left/right association, is there a lot
>    more to it (notionally)?

Stuff in ltm.c and ltm.h.

RiscLua adds bit-twiddling operators &,|,^^,~,>>,<< . Sources at
http://www.wra1th.plus.com/lua/zip/Luasrc.zip .
Search on "#ifdef GCW_BIT" for relevant lines.

--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/