]> git.rm.cloudns.org Git - xonotic/gmqcc.git/commitdiff
unexpected typename error when there are typenames in an expression
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 5 Dec 2012 16:14:44 +0000 (17:14 +0100)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 5 Dec 2012 16:14:44 +0000 (17:14 +0100)
parser.c

index 909fd435ba3241b4f2c44b298cf579c0984e31a9..488d5ce497d5281ad0f6d4cb7be92551b1bcbe6b 100644 (file)
--- a/parser.c
+++ b/parser.c
@@ -1571,6 +1571,10 @@ static ast_expression* parse_expression_leave(parser_t *parser, bool stopatcomma
             vec_pop(parser->pot);
             wantop = true;
         }
+        else if (parser->tok == TOKEN_TYPENAME) {
+            parseerror(parser, "unexpected typename");
+            goto onerr;
+        }
         else if (parser->tok != TOKEN_OPERATOR) {
             if (wantop) {
                 parseerror(parser, "expected operator or end of statement");