Module: wine Branch: master Commit: a7e1c707f166fc6ff59774af8023ac35ad282238 URL: https://gitlab.winehq.org/wine/wine/-/commit/a7e1c707f166fc6ff59774af8023ac3...
Author: Mohamad Al-Jaf mohamadaljaf@gmail.com Date: Mon Apr 3 04:33:58 2023 -0400
widl: Add support for protected attribute.
---
tools/widl/attribute.c | 1 + tools/widl/parser.l | 1 + tools/widl/parser.y | 2 ++ tools/widl/widltypes.h | 1 + 4 files changed, 5 insertions(+)
diff --git a/tools/widl/attribute.c b/tools/widl/attribute.c index 92c6f1a44fa..c5bfbce716d 100644 --- a/tools/widl/attribute.c +++ b/tools/widl/attribute.c @@ -215,6 +215,7 @@ struct allowed_attr allowed_attr[] = /* ATTR_PROPGET */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propget" }, /* ATTR_PROPPUT */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propput" }, /* ATTR_PROPPUTREF */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "propputref" }, + /* ATTR_PROTECTED */ { 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "protected" }, /* ATTR_PROXY */ { 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "proxy" }, /* ATTR_PUBLIC */ { 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "public" }, /* ATTR_RANGE */ { 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, "range" }, diff --git a/tools/widl/parser.l b/tools/widl/parser.l index 3ea03a7a26f..4f24929d5a4 100644 --- a/tools/widl/parser.l +++ b/tools/widl/parser.l @@ -319,6 +319,7 @@ static void winrt_enable( int ns_prefix ) propget { return tPROPGET; } propput { return tPROPPUT; } propputref { return tPROPPUTREF; } + protected { return tPROTECTED; } proxy { return tPROXY; } ptr { return tPTR; } public { return tPUBLIC; } diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 9c07536eac1..29be784448d 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -249,6 +249,7 @@ void pop_import( PARSER_LTYPE *yylloc ); %token tPRAGMA_WARNING %token tPROGID tPROPERTIES %token tPROPGET tPROPPUT tPROPPUTREF +%token tPROTECTED %token tPROXY tPTR %token tPUBLIC %token tRANGE @@ -703,6 +704,7 @@ attribute | tPROPGET { $$ = attr_int( @$, ATTR_PROPGET, 0 ); } | tPROPPUT { $$ = attr_int( @$, ATTR_PROPPUT, 0 ); } | tPROPPUTREF { $$ = attr_int( @$, ATTR_PROPPUTREF, 0 ); } + | tPROTECTED { $$ = attr_int( @$, ATTR_PROTECTED, 0 ); } | tPROXY { $$ = attr_int( @$, ATTR_PROXY, 0 ); } | tPUBLIC { $$ = attr_int( @$, ATTR_PUBLIC, 0 ); } | tRANGE '(' expr_int_const ',' expr_int_const ')' diff --git a/tools/widl/widltypes.h b/tools/widl/widltypes.h index 652c0d822ee..7b68b684c0b 100644 --- a/tools/widl/widltypes.h +++ b/tools/widl/widltypes.h @@ -154,6 +154,7 @@ enum attr_type ATTR_PROPGET, ATTR_PROPPUT, ATTR_PROPPUTREF, + ATTR_PROTECTED, ATTR_PROXY, ATTR_PUBLIC, ATTR_RANGE,