Mercurial > projects > dil
diff trunk/src/dil/Lexer.d @ 410:4d9ee8e60712
Added destructors for two particular tokens.
Fixed some asserts in Lexer.scanNumber().
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Tue, 25 Sep 2007 14:28:35 +0200 |
parents | e7228859d865 |
children | cca83c0c00fd |
line wrap: on
line diff
--- a/trunk/src/dil/Lexer.d Tue Sep 25 12:15:49 2007 +0200 +++ b/trunk/src/dil/Lexer.d Tue Sep 25 14:28:35 2007 +0200 @@ -1410,7 +1410,7 @@ LscanHex: assert(digits == 0); - assert(*p == 'x'); + assert(*p == 'x' || *p == 'X'); while (1) { if (*++p == '_') @@ -1427,7 +1427,7 @@ ulong_ += *p - 'a' + 10; } - assert(ishexad(p[-1]) || p[-1] == '_' || p[-1] == 'x'); + assert(ishexad(p[-1]) || p[-1] == '_' || p[-1] == 'x' || p[-1] == 'X'); assert(!ishexad(*p) && *p != '_'); switch (*p) @@ -1449,7 +1449,7 @@ LscanBinary: assert(digits == 0); - assert(*p == 'b'); + assert(*p == 'b' || *p == 'B'); while (1) { if (*++p == '0') @@ -1474,7 +1474,7 @@ else if (digits > 64) error(MID.OverflowBinaryNumber); - assert(p[-1] == '0' || p[-1] == '1' || p[-1] == '_', p[-1] ~ ""); + assert(p[-1] == '0' || p[-1] == '1' || p[-1] == '_' || p[-1] == 'b' || p[-1] == 'B', p[-1] ~ ""); assert( !(*p == '0' || *p == '1' || *p == '_') ); goto Lfinalize;