Added/finished .MID, .LEFT, .RIGHT

git-svn-id: svn://svn.cc65.org/cc65/trunk@136 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2000-07-08 14:01:43 +00:00
parent 0c85406f52
commit fbe694bca3
8 changed files with 273 additions and 77 deletions

View File

@@ -328,33 +328,31 @@ static void OneLine (void)
* is no colon, it's an assignment.
*/
if (Tok == TOK_EQ) {
/* Skip the '=' */
NextTok ();
/* Define the symbol with the expression following the
* '='
*/
SymDef (Ident, Expression (), 0);
/* Don't allow anything after a symbol definition */
Done = 1;
/* Skip the '=' */
NextTok ();
/* Define the symbol with the expression following the '=' */
SymDef (Ident, Expression (), 0);
/* Don't allow anything after a symbol definition */
Done = 1;
} else {
/* Define a label */
SymDef (Ident, CurrentPC (), IsZPSeg ());
/* Skip the colon. If NoColonLabels is enabled, allow labels
* without a colon if there is no whitespace before the
* identifier.
*/
if (Tok != TOK_COLON) {
if (HadWS || !NoColonLabels) {
Error (ERR_COLON_EXPECTED);
}
if (Tok == TOK_NAMESPACE) {
/* Smart :: handling */
NextTok ();
}
} else {
/* Define a label */
SymDef (Ident, CurrentPC (), IsZPSeg ());
/* Skip the colon. If NoColonLabels is enabled, allow labels
* without a colon if there is no whitespace before the
* identifier.
*/
if (Tok != TOK_COLON) {
if (HadWS || !NoColonLabels) {
Error (ERR_COLON_EXPECTED);
}
if (Tok == TOK_NAMESPACE) {
/* Smart :: handling */
NextTok ();
}
} else {
/* Skip the colon */
NextTok ();
}
NextTok ();
}
}
}
}