Added new emulation feature: loose_char_term

git-svn-id: svn://svn.cc65.org/cc65/trunk@316 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2000-09-02 12:01:40 +00:00
parent a41de0ea3f
commit d27cd62465
6 changed files with 15 additions and 4 deletions

View File

@@ -609,8 +609,13 @@ static ExprNode* Factor (void)
break;
default:
N = LiteralExpr (0); /* Dummy */
Error (ERR_SYNTAX);
if (LooseCharTerm && Tok == TOK_STRCON && strlen(SVal) == 1) {
/* A character constant */
N = LiteralExpr (TgtTranslateChar (SVal[0]));
} else {
N = LiteralExpr (0); /* Dummy */
Error (ERR_SYNTAX);
}
NextTok ();
break;
}