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