From 71ed8810c3b8c170de1fa1cad8f761d3900dacb9 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 6 Jun 2004 18:36:08 +0000 Subject: [PATCH] Minor change git-svn-id: svn://svn.cc65.org/cc65/trunk@3109 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/cc65/scanner.c | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) 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; -- 2.39.5