]> git.sur5r.net Git - cc65/commitdiff
Minor change
authorcuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 6 Jun 2004 18:36:08 +0000 (18:36 +0000)
committercuz <cuz@b7a2c559-68d2-44c3-8de9-860c34a00d81>
Sun, 6 Jun 2004 18:36:08 +0000 (18:36 +0000)
git-svn-id: svn://svn.cc65.org/cc65/trunk@3109 b7a2c559-68d2-44c3-8de9-860c34a00d81

src/cc65/scanner.c

index 1640e5c5cb787a00a25dc6a003b7bcb8f24b1cbe..cc98d08fe7e0a45192a1aaa9826e1ed7876b695e 100644 (file)
@@ -688,7 +688,7 @@ void NextToken (void)
     }
 
     /* Determine the next token from the lookahead */
-    if (IsDigit (CurC)) {
+    if (IsDigit (CurC) || (CurC == '.' && IsDigit (NextC))) {
        /* A number */
         NumericConst ();
        return;
@@ -824,21 +824,17 @@ void NextToken (void)
            }
            break;
 
-       case '.':     
-            if (IsDigit (NextC)) {
-                NumericConst ();
-            } else {
+       case '.':
+            NextChar ();
+            if (CurC == '.') {
                 NextChar ();
                 if (CurC == '.') {
-                    NextChar ();
-                    if (CurC == '.') {
-                        SetTok (TOK_ELLIPSIS);
-                    } else {
-                        UnknownChar (CurC);
-                    }
+                    SetTok (TOK_ELLIPSIS);
                 } else {
-                    NextTok.Tok = TOK_DOT;
+                    UnknownChar (CurC);
                 }
+            } else {
+                NextTok.Tok = TOK_DOT;
             }
            break;