Add comment noting \e is a non-standard string escape

This commit is contained in:
Olly Betts 2024-08-15 14:39:21 +12:00
parent 4299e893da
commit 8513f24ec6
1 changed files with 3 additions and 0 deletions

View File

@ -442,6 +442,9 @@ static void get_escape(Scanner *s) {
return;
}
if (c == 'e') {
// '\e' is a non-standard alternative to '\033' (the escape character)
// in both C and C++, but is supported by at least GCC and clang. MSVC
// issues a warning and treats it as an 'e'.
Delitem(s->text, DOH_END);
Append(s->text,"\033");
return;