widl: Support WinRT activatable attribute parsing.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-02-09 10:37:19 +01:00 committed by Alexandre Julliard
parent 146ed693d6
commit 30129c2837
3 changed files with 5 additions and 0 deletions

View File

@ -320,6 +320,7 @@ static const struct keyword keywords[] = {
*/
static const struct keyword attr_keywords[] =
{
{"activatable", tACTIVATABLE, 1},
{"aggregatable", tAGGREGATABLE, 0},
{"agile", tAGILE, 1},
{"all_nodes", tALLNODES, 0},

View File

@ -166,6 +166,7 @@ static typelib_t *current_typelib;
%token GREATEREQUAL LESSEQUAL
%token LOGICALOR LOGICALAND
%token ELLIPSIS
%token tACTIVATABLE
%token tAGGREGATABLE
%token tAGILE
%token tALLNODES tALLOCATE tANNOTATION
@ -539,6 +540,7 @@ contract_req: decl_spec ',' contract_ver { if ($1->type->type_type != TYPE_APICO
}
attribute: { $$ = NULL; }
| tACTIVATABLE '(' contract_req ')' { $$ = make_attrp(ATTR_ACTIVATABLE, $3); }
| tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); }
| tANNOTATION '(' aSTRING ')' { $$ = make_attrp(ATTR_ANNOTATION, $3); }
| tAPPOBJECT { $$ = make_attr(ATTR_APPOBJECT); }
@ -2162,6 +2164,7 @@ struct allowed_attr
struct allowed_attr allowed_attr[] =
{
/* attr { D ACF M I Fn ARG T En Enm St Un Fi L DI M C AC R <display name> } */
/* ATTR_ACTIVATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "activatable" },
/* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, "aggregatable" },
/* ATTR_ALLOCATE */ { 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "allocate" },
/* ATTR_ANNOTATION */ { 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" },

View File

@ -69,6 +69,7 @@ typedef struct list warning_list_t;
enum attr_type
{
ATTR_ACTIVATABLE,
ATTR_AGGREGATABLE,
ATTR_ALLOCATE,
ATTR_ANNOTATION,