Rémi Bernon : widl: Support WinRT activatable attribute parsing.

Alexandre Julliard julliard at winehq.org
Tue Feb 9 15:57:08 CST 2021


Module: wine
Branch: master
Commit: 30129c2837244ecb8394ad47aa545818155a11cd
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=30129c2837244ecb8394ad47aa545818155a11cd

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Tue Feb  9 10:37:19 2021 +0100

widl: Support WinRT activatable attribute parsing.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Jacek Caban <jacek at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 tools/widl/parser.l    | 1 +
 tools/widl/parser.y    | 3 +++
 tools/widl/widltypes.h | 1 +
 3 files changed, 5 insertions(+)

diff --git a/tools/widl/parser.l b/tools/widl/parser.l
index 8acc9c9590c..d726e76744e 100644
--- a/tools/widl/parser.l
+++ b/tools/widl/parser.l
@@ -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},
diff --git a/tools/widl/parser.y b/tools/widl/parser.y
index b43a1cdd5f2..eaeba90609d 100644
--- a/tools/widl/parser.y
+++ b/tools/widl/parser.y
@@ -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" },
diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h
index 0fba33d6a09..5d4532d6434 100644
--- a/tools/widl/widltypes.h
+++ b/tools/widl/widltypes.h
@@ -69,6 +69,7 @@ typedef struct list warning_list_t;
 
 enum attr_type
 {
+    ATTR_ACTIVATABLE,
     ATTR_AGGREGATABLE,
     ATTR_ALLOCATE,
     ATTR_ANNOTATION,




More information about the wine-cvs mailing list