insert an error when an operator doesn't get found - note the comment...

This commit is contained in:
Wolfgang Bumiller 2013-02-05 17:17:38 +01:00
parent 31ce4c2afa
commit 15141897ae

View file

@ -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];