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

This commit is contained in:
Rob Shearman 2008-04-29 20:40:48 +01:00 committed by Alexandre Julliard
parent 4f8f89e6bb
commit 017213e11a
1 changed files with 5 additions and 4 deletions

View File

@ -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); constdef: tCONST decl_spec declarator '=' expr_const
set_type($$, $2, NULL, FALSE); { $$ = reg_const($3->var);
set_type($$, $2, $3, FALSE);
$$->eval = $5; $$->eval = $5;
} }
; ;
@ -720,8 +721,8 @@ expr_const: expr { $$ = $1;
} }
; ;
externdef: tEXTERN tCONST decl_spec ident { $$ = $4; externdef: tEXTERN tCONST decl_spec declarator { $$ = $4->var;
set_type($$, $3, NULL, FALSE); set_type($$, $3, $4, FALSE);
} }
; ;