[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: operator overloading
- From: Gavin Wraith <gavin@...>
- Date: Sun, 04 Nov 2012 20:04:04 GMT
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/