mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2025-02-20 18:32:01 +00:00
guard ]] with lex->flags.noops
This commit is contained in:
parent
eb952f1199
commit
77639bb21d
1 changed files with 9 additions and 7 deletions
16
lexer.c
16
lexer.c
|
@ -1135,14 +1135,16 @@ int lex_do(lex_file *lex)
|
|||
return (lex->tok.ttype = TOKEN_OPERATOR);
|
||||
|
||||
case ']':
|
||||
nextch = lex_getch(lex);
|
||||
if (nextch == ']') {
|
||||
lex_tokench(lex, ch);
|
||||
lex_tokench(lex, nextch);
|
||||
lex_endtoken(lex);
|
||||
return (lex->tok.ttype = TOKEN_ATTRIBUTE_CLOSE);
|
||||
if (lex->flags.noops) {
|
||||
nextch = lex_getch(lex);
|
||||
if (nextch == ']') {
|
||||
lex_tokench(lex, ch);
|
||||
lex_tokench(lex, nextch);
|
||||
lex_endtoken(lex);
|
||||
return (lex->tok.ttype = TOKEN_ATTRIBUTE_CLOSE);
|
||||
}
|
||||
lex_ungetch(lex, nextch);
|
||||
}
|
||||
lex_ungetch(lex, nextch);
|
||||
/* FALL THROUGH */
|
||||
case ')':
|
||||
case ';':
|
||||
|
|
Loading…
Reference in a new issue