Allow to leave of the end address of a range if it is identical to the start

address. Currently unused.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5059 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz
2011-06-13 21:43:26 +00:00
parent 51ccf2d576
commit 244ca4daf7

View File

@@ -1733,14 +1733,6 @@ static int ConsumeEqual (InputData* D)
static int ConsumeMinus (InputData* D)
/* Consume a minus sign */
{
return Consume (D, TOK_MINUS, "'-'");
}
static void ConsumeEOL (InputData* D) static void ConsumeEOL (InputData* D)
/* Consume an end-of-line token, if we aren't at end-of-file */ /* Consume an end-of-line token, if we aren't at end-of-file */
{ {
@@ -1959,14 +1951,18 @@ static void ParseLine (InputData* D)
} }
Start = (cc65_addr) D->IVal; Start = (cc65_addr) D->IVal;
NextToken (D); NextToken (D);
if (!ConsumeMinus (D)) { if (D->Tok == TOK_MINUS) {
goto ErrorExit; /* End of range follows */
} NextToken (D);
if (!IntConstFollows (D)) { if (!IntConstFollows (D)) {
goto ErrorExit; goto ErrorExit;
} }
End = (cc65_addr) D->IVal; End = (cc65_addr) D->IVal;
NextToken (D); NextToken (D);
} else {
/* Start and end are identical */
End = Start;
}
InfoBits |= ibRange; InfoBits |= ibRange;
break; break;