Commit ab32b3df authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

widl: Add support for parsing the annotation attribute.

parent a5107da4
...@@ -279,6 +279,7 @@ static const struct keyword attr_keywords[] = ...@@ -279,6 +279,7 @@ static const struct keyword attr_keywords[] =
{ {
{"aggregatable", tAGGREGATABLE}, {"aggregatable", tAGGREGATABLE},
{"allocate", tALLOCATE}, {"allocate", tALLOCATE},
{"annotation", tANNOTATION},
{"appobject", tAPPOBJECT}, {"appobject", tAPPOBJECT},
{"async", tASYNC}, {"async", tASYNC},
{"async_uuid", tASYNCUUID}, {"async_uuid", tASYNCUUID},
......
...@@ -194,7 +194,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s ...@@ -194,7 +194,7 @@ static statement_list_t *append_statement(statement_list_t *list, statement_t *s
%token EQUALITY INEQUALITY %token EQUALITY INEQUALITY
%token GREATEREQUAL LESSEQUAL %token GREATEREQUAL LESSEQUAL
%token LOGICALOR LOGICALAND %token LOGICALOR LOGICALAND
%token tAGGREGATABLE tALLOCATE tAPPOBJECT tASYNC tASYNCUUID %token tAGGREGATABLE tALLOCATE tANNOTATION tAPPOBJECT tASYNC tASYNCUUID
%token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT %token tAUTOHANDLE tBINDABLE tBOOLEAN tBROADCAST tBYTE tBYTECOUNT
%token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS %token tCALLAS tCALLBACK tCASE tCDECL tCHAR tCOCLASS tCODE tCOMMSTATUS
%token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE %token tCONST tCONTEXTHANDLE tCONTEXTHANDLENOSERIALIZE
...@@ -472,6 +472,7 @@ str_list: aSTRING { $$ = append_str( NULL, $1 ); } ...@@ -472,6 +472,7 @@ str_list: aSTRING { $$ = append_str( NULL, $1 ); }
attribute: { $$ = NULL; } attribute: { $$ = NULL; }
| tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); } | tAGGREGATABLE { $$ = make_attr(ATTR_AGGREGATABLE); }
| tANNOTATION '(' aSTRING ')' { $$ = make_attrp(ATTR_ANNOTATION, $3); }
| tAPPOBJECT { $$ = make_attr(ATTR_APPOBJECT); } | tAPPOBJECT { $$ = make_attr(ATTR_APPOBJECT); }
| tASYNC { $$ = make_attr(ATTR_ASYNC); } | tASYNC { $$ = make_attr(ATTR_ASYNC); }
| tAUTOHANDLE { $$ = make_attr(ATTR_AUTO_HANDLE); } | tAUTOHANDLE { $$ = make_attr(ATTR_AUTO_HANDLE); }
...@@ -1872,6 +1873,7 @@ struct allowed_attr allowed_attr[] = ...@@ -1872,6 +1873,7 @@ struct allowed_attr allowed_attr[] =
{ {
/* attr { D ACF I Fn ARG T En St Un Fi L DI M C <display name> } */ /* attr { D ACF I Fn ARG T En St Un Fi L DI M C <display name> } */
/* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "aggregatable" }, /* ATTR_AGGREGATABLE */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "aggregatable" },
/* ATTR_ANNOTATION */ { 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, "annotation" },
/* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" }, /* ATTR_APPOBJECT */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, "appobject" },
/* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" }, /* ATTR_ASYNC */ { 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "async" },
/* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" }, /* ATTR_AUTO_HANDLE */ { 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, "auto_handle" },
......
...@@ -72,6 +72,7 @@ typedef struct list statement_list_t; ...@@ -72,6 +72,7 @@ typedef struct list statement_list_t;
enum attr_type enum attr_type
{ {
ATTR_AGGREGATABLE, ATTR_AGGREGATABLE,
ATTR_ANNOTATION,
ATTR_APPOBJECT, ATTR_APPOBJECT,
ATTR_ASYNC, ATTR_ASYNC,
ATTR_AUTO_HANDLE, ATTR_AUTO_HANDLE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment