# HG changeset patch # User aziz # Date 1182863700 0 # Node ID 1845c23dd056eafca5cc048d35975f3e0dd4b611 # Parent c6a9974a6e3cebc285ca3fdb4354c6c049e204a1 - Matched some parts of the scanner of block comments to the scanner of nested comments. diff -r c6a9974a6e3c -r 1845c23dd056 trunk/src/Lexer.d --- a/trunk/src/Lexer.d Tue Jun 26 12:56:03 2007 +0000 +++ b/trunk/src/Lexer.d Tue Jun 26 13:15:00 2007 +0000 @@ -301,17 +301,18 @@ { ++loc; ++p; - continue; } + continue; default: c &= char.max; goto LswitchNC; } } case '*': - c = *++p; while (1) { + c = *++p; + LswitchBC: // only jumped to from default case of next switch(c) switch (c) { case '\r': @@ -319,7 +320,6 @@ ++p; case '\n': ++loc; - c = *++p; continue; case 0, _Z_: error(MID.UnterminatedBlockComment); @@ -341,12 +341,12 @@ if (p[1] == LS[2] || p[1] == PS[2]) { ++loc; - c = *(p += 2); - continue; + ++p; } + continue; default: c &= char.max; - continue; + goto LswitchBC; } } assert(0);