From: cuz Date: Sun, 6 Jun 2004 18:36:08 +0000 (+0000) Subject: Minor change X-Git-Tag: V2.12.0~723 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=71ed8810c3b8c170de1fa1cad8f761d3900dacb9;p=cc65 Minor change git-svn-id: svn://svn.cc65.org/cc65/trunk@3109 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/cc65/scanner.c b/src/cc65/scanner.c index 1640e5c5c..cc98d08fe 100644 --- a/src/cc65/scanner.c +++ b/src/cc65/scanner.c @@ -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;