[fpc-devel] adding a new token to compiler cause exception

Sven Barth pascaldragon at googlemail.com
Tue Oct 13 23:50:29 CEST 2015

Am 13.10.2015 21:42 schrieb "MohsenTi" <mohsen.timar at gmail.com>:
> I want to add two overloadable operators “>>” and “<<” to use them as
“shr” and “shl” ,or writing into and reading from streams and the other
functions like those mentioned above.

Oh dear. You picked yourself the most complicated case in the whole
compiler. ">>" and "<<" are automatically converted by the scanner to "shr"
and "shl", because someone in the past thought this would ease porting of
C-code... And nowadays I have to deal with the consequences related
My tipp: don't use these operators. Period.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20151013/2badb2f4/attachment.html>

More information about the fpc-devel mailing list