Rob Shearman : widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements .

Alexandre Julliard julliard at winehq.org
Wed Apr 30 06:57:30 CDT 2008


Module: wine
Branch: master
Commit: 017213e11a52c30a39d70eeac9c5dbd4a5e2c450
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=017213e11a52c30a39d70eeac9c5dbd4a5e2c450

Author: Rob Shearman <rob at codeweavers.com>
Date:   Tue Apr 29 20:40:48 2008 +0100

widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements.

---

 tools/widl/parser.y |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index 8c99da4..b5e95cc 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -602,8 +602,9 @@ case:	  tCASE expr_int_const ':' union_field	{ attr_t *a = make_attrp(ATTR_CASE,
 						}
 	;
 
-constdef: tCONST decl_spec ident '=' expr_const	{ $$ = reg_const($3);
-						  set_type($$, $2, NULL, FALSE);
+constdef: tCONST decl_spec declarator '=' expr_const
+						{ $$ = reg_const($3->var);
+						  set_type($$, $2, $3, FALSE);
 						  $$->eval = $5;
 						}
 	;
@@ -720,8 +721,8 @@ expr_const: expr				{ $$ = $1;
 						}
 	;
 
-externdef: tEXTERN tCONST decl_spec ident	{ $$ = $4;
-						  set_type($$, $3, NULL, FALSE);
+externdef: tEXTERN tCONST decl_spec declarator	{ $$ = $4->var;
+						  set_type($$, $3, $4, FALSE);
 						}
 	;
 




More information about the wine-cvs mailing list