WIDL: check for inapplicable attributes in typedef
Saveliy Tretiakov
saveliyt at mail.ru
Wed Mar 15 00:35:25 CST 2006
ChangeLog:
Saveliy Tretiakov <saveliyt at mail.ru>
Chek for inapplicable attributes in typedef.
-------------- next part --------------
Index: parser.y
===================================================================
RCS file: /home/wine/wine/tools/widl/parser.y,v
retrieving revision 1.63
diff -u -p -r1.63 parser.y
--- parser.y 9 Feb 2006 11:51:32 -0000 1.63
+++ parser.y 12 Mar 2006 11:36:56 -0000
@@ -768,7 +769,25 @@ type: tVOID { $$ = make_tref(NULL,
| tUNION aIDENTIFIER { $$ = make_tref(NULL, find_type2($2, tsUNION)); }
;
-typedef: tTYPEDEF m_attributes type pident_list { typeref_t *tref = uniq_tref($3);
+typedef: tTYPEDEF m_attributes type pident_list {
+ attr_t *a = $2;
+ while(a){
+ switch(a->type)
+ {
+ case ATTR_CONTEXTHANDLE:
+ case ATTR_STRING:
+ case ATTR_HANDLE:
+ case ATTR_SWITCHTYPE:
+ case ATTR_TRANSMITAS:
+ case ATTR_POINTERTYPE:
+ //FIXME: missing ATTR_IGNORE
+ break;
+ default:
+ yyerror("Inapplicable attribute\n");
+ }
+ a = NEXT_LINK(a);
+ }
+ typeref_t *tref = uniq_tref($3);
$4->tname = tref->name;
tref->name = NULL;
$$ = type_ref(tref);
More information about the wine-patches
mailing list