Implement 'character' literals (#1747)

This commit is contained in:
Rangi
2025-07-15 13:08:50 -04:00
committed by GitHub
parent b6d77fbb9e
commit 1fecf80659
8 changed files with 124 additions and 11 deletions

View File

@@ -293,7 +293,7 @@ yy::parser::symbol_type yylex() {
c = '\r';
} else if (c == 't') {
c = '\t';
} else if (c != '\\' && c != '"') {
} else if (c != '\\' && c != '"' && c != '\'') {
scriptError(context, "Cannot escape character %s", printChar(c));
}
context.file.sbumpc();