Commit 017213e1 authored by Rob Shearman's avatar Rob Shearman Committed by Alexandre Julliard

widl: Make constdef and externdef take a declarator instead of an ident so that…

widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements.
parent 4f8f89e6
......@@ -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);
}
;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment