Nice/src/bossa/syntax constant.nice,1.15,1.16
Arjan Boeijink <[email protected]> Sat, 12 Mar 2005 02:27:10 +0000
| Newsgroups | gmane.comp.lang.nice.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/nice/Nice/src/bossa/syntax
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2102/F:/nice/src/bossa/syntax
Modified Files:
constant.nice
Log Message:
Fixed double negation of literals.
Index: constant.nice
===================================================================
RCS file: /cvsroot/nice/Nice/src/bossa/syntax/constant.nice,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** constant.nice 12 Mar 2005 01:15:51 -0000 1.15
--- constant.nice 12 Mar 2005 02:27:07 -0000 1.16
***************
*** 44,48 ****
public ConstantExp makeNegative()
{
! LocatedString newRepres = new LocatedString("-"+representation, this.location());
if (value instanceof Float || value instanceof Double)
--- 44,52 ----
public ConstantExp makeNegative()
{
! LocatedString newRepres;
! if (representation[0] == '-')
! newRepres = new LocatedString(representation.substring(1), this.location());
! else
! newRepres = new LocatedString("-"+representation, this.location());
if (value instanceof Float || value instanceof Double)
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click