changeset 43:1845c23dd056

- Matched some parts of the scanner of block comments to the scanner of nested comments.
author aziz
date Tue, 26 Jun 2007 13:15:00 +0000
parents c6a9974a6e3c
children 5055947e0f98
files trunk/src/Lexer.d
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- 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);