From a4eaa2a89bb3bc4405593b081110a7452600f4c9 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 2 Feb 2011 21:58:53 +0900 Subject: [PATCH] Allow typedefed types and classes in parameters. --- tools/qfcc/source/qc-parse.y | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tools/qfcc/source/qc-parse.y b/tools/qfcc/source/qc-parse.y index 6ccc52075..dc81ecc91 100644 --- a/tools/qfcc/source/qc-parse.y +++ b/tools/qfcc/source/qc-parse.y @@ -588,6 +588,11 @@ param_declaration $2->type = append_type ($2->type, $1.type); $$ = new_param (0, $2->type, $2->name); } + | type_name_or_class_name var_decl + { + $2->type = append_type ($2->type, $1->type); + $$ = new_param (0, $2->type, $2->name); + } | abstract_decl { $$ = new_param (0, $1->type, 0); } | ELLIPSIS { $$ = new_param (0, 0, 0); } ; @@ -598,7 +603,7 @@ abstract_decl $$ = $2; $$->type = append_type ($$->type, $1.type); } - | TYPE_NAME abs_decl + | type_name_or_class_name abs_decl { $$ = $2; $$->type = append_type ($$->type, $1->type);