Added support for the propget/propput function attributes.
This commit is contained in:
parent
c579fa6213
commit
4806630104
|
@ -90,6 +90,10 @@ static void write_pident(FILE *h, var_t *v)
|
|||
|
||||
void write_name(FILE *h, var_t *v)
|
||||
{
|
||||
if (is_attr( v->attrs, ATTR_PROPGET ))
|
||||
fprintf(h, "get_" );
|
||||
else if (is_attr( v->attrs, ATTR_PROPPUT ))
|
||||
fprintf(h, "put_" );
|
||||
fprintf(h, "%s", v->name);
|
||||
}
|
||||
|
||||
|
|
|
@ -262,6 +262,8 @@ static struct keyword {
|
|||
{"pointer_default", tPOINTERDEFAULT},
|
||||
/* ... */
|
||||
{"properties", tPROPERTIES},
|
||||
{"propget", tPROPGET},
|
||||
{"propput", tPROPPUT},
|
||||
/* ... */
|
||||
{"public", tPUBLIC},
|
||||
/* ... */
|
||||
|
|
|
@ -156,6 +156,7 @@ static type_t std_uhyper = { "MIDL_uhyper" };
|
|||
%token tOUT
|
||||
%token tPOINTERDEFAULT
|
||||
%token tPROPERTIES
|
||||
%token tPROPGET tPROPPUT
|
||||
%token tPUBLIC
|
||||
%token tREADONLY tREF
|
||||
%token tRETVAL
|
||||
|
@ -359,6 +360,8 @@ attribute:
|
|||
| tOLEAUTOMATION { $$ = make_attr(ATTR_OLEAUTOMATION); }
|
||||
| tOUT { $$ = make_attr(ATTR_OUT); }
|
||||
| tPOINTERDEFAULT '(' pointer_type ')' { $$ = make_attrv(ATTR_POINTERDEFAULT, $3); }
|
||||
| tPROPGET { $$ = make_attr(ATTR_PROPGET); }
|
||||
| tPROPPUT { $$ = make_attr(ATTR_PROPPUT); }
|
||||
| tPUBLIC { $$ = make_attr(ATTR_PUBLIC); }
|
||||
| tREADONLY { $$ = make_attr(ATTR_READONLY); }
|
||||
| tRETVAL { $$ = make_attr(ATTR_RETVAL); }
|
||||
|
@ -502,7 +505,7 @@ funcdef:
|
|||
$4->attrs = $1;
|
||||
$$ = make_func($4, $6);
|
||||
if (is_attr($4->attrs, ATTR_IN)) {
|
||||
yyerror("Inapplicatable attribute");
|
||||
yyerror("Inapplicable attribute");
|
||||
}
|
||||
if (!is_attr($4->attrs, ATTR_OUT)) {
|
||||
attr_t *a = make_attr(ATTR_OUT);
|
||||
|
|
|
@ -83,6 +83,8 @@ enum attr_type
|
|||
ATTR_OUT,
|
||||
ATTR_POINTERDEFAULT,
|
||||
ATTR_POINTERTYPE,
|
||||
ATTR_PROPGET,
|
||||
ATTR_PROPPUT,
|
||||
ATTR_PUBLIC,
|
||||
ATTR_READONLY,
|
||||
ATTR_RETVAL,
|
||||
|
|
Loading…
Reference in New Issue