Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
712f87ee
Commit
712f87ee
authored
Mar 31, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Apr 03, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Add support for composable attribute.
Needed to build windows.ui.composition.idl.
parent
a7e1c707
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
0 deletions
+20
-0
attribute.c
tools/widl/attribute.c
+1
-0
parser.l
tools/widl/parser.l
+1
-0
parser.y
tools/widl/parser.y
+17
-0
widltypes.h
tools/widl/widltypes.h
+1
-0
No files found.
tools/widl/attribute.c
View file @
712f87ee
...
...
@@ -145,6 +145,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_CASE */
{
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
"case"
},
/* ATTR_CODE */
{
0
,
1
,
0
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
"code"
},
/* ATTR_COMMSTATUS */
{
0
,
0
,
0
,
0
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
"comm_status"
},
/* ATTR_COMPOSABLE */
{
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
"composable"
},
/* ATTR_CONTEXTHANDLE */
{
1
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
"context_handle"
},
/* ATTR_CONTRACT */
{
0
,
0
,
0
,
1
,
1
,
0
,
1
,
1
,
1
,
1
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
1
,
"contract"
},
/* ATTR_CONTRACTVERSION */
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
"contractversion"
},
...
...
tools/widl/parser.l
View file @
712f87ee
...
...
@@ -245,6 +245,7 @@ static void winrt_enable( int ns_prefix )
callback { return tCALLBACK; }
code { return tCODE; }
comm_status { return tCOMMSTATUS; }
composable { return token_winrt( tCOMPOSABLE, yytext, yylval ); }
context_handle { return tCONTEXTHANDLE; }
context_handle_noserialize { return tCONTEXTHANDLENOSERIALIZE; }
context_handle_serialize { return tCONTEXTHANDLENOSERIALIZE; }
...
...
tools/widl/parser.y
View file @
712f87ee
...
...
@@ -186,6 +186,7 @@ void pop_import( PARSER_LTYPE *yylloc );
%token tAPPOBJECT tASYNC tASYNCUUID
%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT
%token tCALLAS tCALLBACK tCASE tCHAR tCOCLASS tCODE tCOMMSTATUS
%token tCOMPOSABLE
%token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE
%token tCONTEXTHANDLESERIALIZE
%token tCONTRACT
...
...
@@ -285,6 +286,7 @@ void pop_import( PARSER_LTYPE *yylloc );
%token tWCHAR tWIREMARSHAL
%token tAPARTMENT tNEUTRAL tSINGLE tFREE tBOTH
%type <attr> access_attr
%type <attr> attribute acf_attribute
%type <attr_list> m_attributes attributes attrib_list
%type <attr_list> acf_attributes acf_attribute_list
...
...
@@ -295,6 +297,7 @@ void pop_import( PARSER_LTYPE *yylloc );
%type <expr> contract_req
%type <expr> static_attr
%type <expr> activatable_attr
%type <expr> composable_attr
%type <type> delegatedef
%type <stgclass> storage_cls_spec
%type <type_qualifier> type_qualifier m_type_qual_list
...
...
@@ -612,6 +615,19 @@ activatable_attr:
| contract_req { $$ = $1; } /* activatable on the default activation factory */
;
access_attr
: tPUBLIC { $$ = attr_int( @$, ATTR_PUBLIC, 0 ); }
| tPROTECTED { $$ = attr_int( @$, ATTR_PROTECTED, 0 ); }
;
composable_attr
: decl_spec ',' access_attr ',' contract_req
{ if ($1->type->type_type != TYPE_INTERFACE)
error_loc( "type %s is not an interface\n", $1->type->name );
$$ = make_exprt( EXPR_MEMBER, declare_var( append_attr( NULL, $3 ), $1, make_declarator( NULL ), 0 ), $5 );
}
;
attribute
: %empty { $$ = NULL; }
| tACTIVATABLE '(' activatable_attr ')' { $$ = attr_ptr( @$, ATTR_ACTIVATABLE, $3 ); }
...
...
@@ -625,6 +641,7 @@ attribute
| tCALLAS '(' ident ')' { $$ = attr_ptr( @$, ATTR_CALLAS, $3 ); }
| tCASE '(' expr_list_int_const ')' { $$ = attr_ptr( @$, ATTR_CASE, $3 ); }
| tCODE { $$ = attr_int( @$, ATTR_CODE, 0 ); }
| tCOMPOSABLE '(' composable_attr ')' { $$ = attr_ptr( @$, ATTR_COMPOSABLE, $3 ); }
| tCOMMSTATUS { $$ = attr_int( @$, ATTR_COMMSTATUS, 0 ); }
| tCONTEXTHANDLE { $$ = attr_int( @$, ATTR_CONTEXTHANDLE, 0 ); }
| tCONTEXTHANDLENOSERIALIZE { $$ = attr_int( @$, ATTR_CONTEXTHANDLE, 0 ); /* RPC_CONTEXT_HANDLE_DONT_SERIALIZE */ }
...
...
tools/widl/widltypes.h
View file @
712f87ee
...
...
@@ -84,6 +84,7 @@ enum attr_type
ATTR_CASE
,
ATTR_CODE
,
ATTR_COMMSTATUS
,
ATTR_COMPOSABLE
,
ATTR_CONTEXTHANDLE
,
ATTR_CONTRACT
,
ATTR_CONTRACTVERSION
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment