]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
insert an error when an operator doesn't get found - note the comment...
authorWolfgang Bumiller <blub@speed.at>
Tue, 5 Feb 2013 16:17:38 +0000 (17:17 +0100)
committerWolfgang Bumiller <blub@speed.at>
Tue, 5 Feb 2013 16:17:38 +0000 (17:17 +0100)
parser.c

index 3375accf1864cf203631bd79df9a4acbef6da04a..73ced3afe7cd82829e50a3a6856341ab5cd565a6 100644 (file)
--- a/parser.c
+++ b/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];