diff trunk/src/dil/lexer/Lexer.d @ 763:f26f13b5a3a3

Fixed code in scanSpecialTokenSequence().
author Aziz K?ksal <aziz.koeksal@gmail.com>
date Sat, 16 Feb 2008 01:47:39 +0100
parents c909a3d3fa52
children 4579e8505d5e
line wrap: on
line diff
--- a/trunk/src/dil/lexer/Lexer.d	Sat Feb 16 00:52:43 2008 +0100
+++ b/trunk/src/dil/lexer/Lexer.d	Sat Feb 16 01:47:39 2008 +0100
@@ -2273,14 +2273,15 @@
 
     MID mid;
     char* errorAtColumn = p;
+    char* tokenEnd = ++p;
 
-    ++p;
     if (!(p[0] == 'l' && p[1] == 'i' && p[2] == 'n' && p[3] == 'e'))
     {
       mid = MID.ExpectedIdentifierSTLine;
       goto Lerr;
     }
     p += 3;
+    tokenEnd = p + 1;
 
     // TODO: #line58"path/file" is legal. Require spaces?
     //       State.Space could be used for that purpose.
@@ -2288,7 +2289,7 @@
     { /+Space,+/ Integer, Filespec, End }
 
     State state = State.Integer;
-    char* tokenEnd = p + 1;
+
     while (!isEndOfLine(++p))
     {
       if (isspace(*p))
@@ -2314,7 +2315,7 @@
         state = State.Filespec;
       }
       else if (state == State.Filespec && *p == '"')
-      { // MID.ExpectedFilespec is eprecated.
+      { // MID.ExpectedFilespec is deprecated.
         // if (*p != '"')
         // {
         //   errorAtColumn = p;