mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-01-31 03:50:36 +00:00
fteqcc's \{number\} string control sequences
This commit is contained in:
parent
fefb51c592
commit
b476a3deca
1 changed files with 10 additions and 0 deletions
10
lexer.c
10
lexer.c
|
@ -822,6 +822,16 @@ static int GMQCC_WARN lex_finish_string(lex_file *lex, int quote)
|
|||
case '>': ch = 31; break;
|
||||
case '[': ch = 16; break;
|
||||
case ']': ch = 17; break;
|
||||
case '{':
|
||||
ch = 0;
|
||||
for (nextch = lex_getch(lex); nextch != '}'; nextch = lex_getch(lex)) {
|
||||
ch = ch * 10 + nextch - '0';
|
||||
if (nextch < '0' || nextch > '9' || ch > 255) {
|
||||
lexerror(lex, "bad character code");
|
||||
return (lex->tok.ttype = TOKEN_ERROR);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case '\n': ch = '\n'; break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in a new issue