Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
711cd500
Commit
711cd500
authored
Jul 05, 2023
by
Bernhard Kölbl
Committed by
Alexandre Julliard
Jul 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
widl: Add basic support for the [deprecated] attribute.
Signed-off-by:
Bernhard Kölbl
<
bkoelbl@codeweavers.com
>
parent
a6bc5f34
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
0 deletions
+11
-0
attribute.c
tools/widl/attribute.c
+1
-0
parser.l
tools/widl/parser.l
+1
-0
parser.y
tools/widl/parser.y
+8
-0
widltypes.h
tools/widl/widltypes.h
+1
-0
No files found.
tools/widl/attribute.c
View file @
711cd500
...
...
@@ -157,6 +157,7 @@ struct allowed_attr allowed_attr[] =
/* ATTR_DEFAULTCOLLELEM */
{
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
"defaultcollelem"
},
/* ATTR_DEFAULTVALUE */
{
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
"defaultvalue"
},
/* ATTR_DEFAULTVTABLE */
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
"defaultvtable"
},
/* ATTR_DEPRECATED */
{
0
,
0
,
0
,
1
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
"deprecated"
},
/* ATTR_DISABLECONSISTENCYCHECK */
{
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
"disable_consistency_check"
},
/* ATTR_DISPINTERFACE */
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
NULL
},
/* ATTR_DISPLAYBIND */
{
0
,
0
,
0
,
0
,
1
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
"displaybind"
},
...
...
tools/widl/parser.l
View file @
711cd500
...
...
@@ -258,6 +258,7 @@ static void winrt_enable( int ns_prefix )
defaultcollelem { return tDEFAULTCOLLELEM; }
defaultvalue { return tDEFAULTVALUE; }
defaultvtable { return tDEFAULTVTABLE; }
deprecated { return token_winrt( tDEPRECATED, yytext, yylval ); }
disable_consistency_check { return tDISABLECONSISTENCYCHECK; }
displaybind { return tDISPLAYBIND; }
dllname { return tDLLNAME; }
...
...
tools/widl/parser.y
View file @
711cd500
...
...
@@ -199,6 +199,7 @@ void pop_import( PARSER_LTYPE *yylloc );
%token tDEFAULTCOLLELEM
%token tDEFAULTVALUE
%token tDEFAULTVTABLE
%token tDEPRECATED
%token tDISABLECONSISTENCYCHECK tDISPLAYBIND
%token tDISPINTERFACE
%token tDLLNAME tDONTFREE tDOUBLE tDUAL
...
...
@@ -298,6 +299,7 @@ void pop_import( PARSER_LTYPE *yylloc );
%type <expr> static_attr
%type <expr> activatable_attr
%type <expr> composable_attr
%type <expr> deprecated_attr
%type <type> delegatedef
%type <stgclass> storage_cls_spec
%type <type_qualifier> type_qualifier m_type_qual_list
...
...
@@ -628,6 +630,11 @@ composable_attr
}
;
deprecated_attr
: aSTRING ',' aIDENTIFIER ',' contract_req
{ $$ = make_expr3( EXPR_MEMBER, make_exprs( EXPR_STRLIT, $1 ), make_exprs( EXPR_IDENTIFIER, $3 ), $5 ); }
;
attribute
: %empty { $$ = NULL; }
| tACTIVATABLE '(' activatable_attr ')' { $$ = attr_ptr( @$, ATTR_ACTIVATABLE, $3 ); }
...
...
@@ -659,6 +666,7 @@ attribute
| tDEFAULTCOLLELEM { $$ = attr_int( @$, ATTR_DEFAULTCOLLELEM, 0 ); }
| tDEFAULTVALUE '(' expr_const ')' { $$ = attr_ptr( @$, ATTR_DEFAULTVALUE, $3 ); }
| tDEFAULTVTABLE { $$ = attr_int( @$, ATTR_DEFAULTVTABLE, 0 ); }
| tDEPRECATED '(' deprecated_attr ')' { $$ = attr_ptr( @$, ATTR_DEPRECATED, $3 ); }
| tDISABLECONSISTENCYCHECK { $$ = attr_int( @$, ATTR_DISABLECONSISTENCYCHECK, 0 ); }
| tDISPLAYBIND { $$ = attr_int( @$, ATTR_DISPLAYBIND, 0 ); }
| tDLLNAME '(' aSTRING ')' { $$ = attr_ptr( @$, ATTR_DLLNAME, $3 ); }
...
...
tools/widl/widltypes.h
View file @
711cd500
...
...
@@ -96,6 +96,7 @@ enum attr_type
ATTR_DEFAULTCOLLELEM
,
ATTR_DEFAULTVALUE
,
ATTR_DEFAULTVTABLE
,
ATTR_DEPRECATED
,
ATTR_DISABLECONSISTENCYCHECK
,
ATTR_DISPINTERFACE
,
ATTR_DISPLAYBIND
,
...
...
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