mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 14:12:36 +00:00
Fixing lexer to not classify wrong tokens as operators
This commit is contained in:
parent
511058c018
commit
22d6ff2309
1 changed files with 1 additions and 8 deletions
9
lexer.c
9
lexer.c
|
@ -852,6 +852,7 @@ int lex_do(lex_file *lex)
|
|||
/* single-character tokens */
|
||||
switch (ch)
|
||||
{
|
||||
case '[':
|
||||
case '(':
|
||||
if (!lex_tokench(lex, ch) ||
|
||||
!lex_endtoken(lex))
|
||||
|
@ -866,14 +867,6 @@ int lex_do(lex_file *lex)
|
|||
case ';':
|
||||
case '{':
|
||||
case '}':
|
||||
case '[':
|
||||
if (!lex_tokench(lex, ch) ||
|
||||
!lex_endtoken(lex))
|
||||
{
|
||||
return (lex->tok.ttype = TOKEN_FATAL);
|
||||
}
|
||||
if (!lex->flags.noops)
|
||||
return (lex->tok.ttype = TOKEN_OPERATOR);
|
||||
case ']':
|
||||
|
||||
case '#':
|
||||
|
|
Loading…
Reference in a new issue