Merge pull request #2636 from GorillaSapiens/issue_2607

issue #2607, enable '\e' character escape for --standard cc65
This commit is contained in:
Bob Andrews
2025-05-06 01:47:23 +02:00
committed by GitHub
7 changed files with 110 additions and 2 deletions

View File

@@ -355,6 +355,14 @@ static parsedchar_t ParseChar (void)
case 'b':
C = '\b';
break;
case 'e':
if (IS_Get(&Standard) != STD_CC65) {
goto IllegalEscape;
}
/* we'd like to use \e here, but */
/* not all build systems support it */
C = '\x1B';
break;
case 'f':
C = '\f';
break;
@@ -422,6 +430,7 @@ static parsedchar_t ParseChar (void)
Error ("Octal character constant out of range");
break;
default:
IllegalEscape:
C = CurC;
Error ("Illegal escaped character: 0x%02X", CurC);
break;