mirror of
https://github.com/DarkPlacesEngine/gmqcc.git
synced 2024-11-27 22:22:17 +00:00
insert an error when an operator doesn't get found - note the comment...
This commit is contained in:
parent
31ce4c2afa
commit
15141897ae
1 changed files with 5 additions and 0 deletions
5
parser.c
5
parser.c
|
@ -1898,8 +1898,13 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
|
|||
}
|
||||
}
|
||||
if (o == operator_count) {
|
||||
compile_error(parser_ctx(parser), "unknown operator: %s", parser_tokval(parser));
|
||||
goto onerr;
|
||||
#if 0
|
||||
Are there any expressions which actually end with an operator?
|
||||
/* no operator found... must be the end of the statement */
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
/* found an operator */
|
||||
op = &operators[o];
|
||||
|
|
Loading…
Reference in a new issue