1
0
mirror of https://github.com/cc65/cc65.git synced 2024-09-27 19:55:09 +00:00

Fixed parsing a labeled-statement: A label is always part of a statement, it

is not itself one.


git-svn-id: svn://svn.cc65.org/cc65/trunk@4166 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2009-09-13 14:36:16 +00:00
parent fe652c8206
commit 32e2eb3fad

View File

@ -544,14 +544,14 @@ int Statement (int* PendingToken)
*PendingToken = 0;
}
/* Check for a label */
if (CurTok.Tok == TOK_IDENT && NextTok.Tok == TOK_COLON) {
/* Special handling for a label */
/* Check for a label. A label is always part of a statement, it does not
* replace one.
*/
while (CurTok.Tok == TOK_IDENT && NextTok.Tok == TOK_COLON) {
/* Handle the label */
DoLabel ();
CheckLabelWithoutStatement ();
} else {
}
switch (CurTok.Tok) {
@ -639,7 +639,6 @@ int Statement (int* PendingToken)
}
CheckSemi (PendingToken);
}
}
return 0;
}