From bab99337f88853d6c7a3f418ec175b33974a3d48 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Tue, 1 May 2007 02:00:57 +0000 Subject: r22618: handle the properties related to the type and not to 'declare' to avoid a pidl warning with: declare [switch_type(uint16)] union netr_Validation; void foo([in] uint16 level, [in,switch_is(level)] netrValidation info); metze (This used to be commit 3b3344f1df000974ad89bf370e99fd6b6dc42000) --- source4/pidl/idl.yp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'source4/pidl/idl.yp') diff --git a/source4/pidl/idl.yp b/source4/pidl/idl.yp index e7d1ce7898..9e63a5846a 100644 --- a/source4/pidl/idl.yp +++ b/source4/pidl/idl.yp @@ -122,12 +122,11 @@ function: property_list type identifier '(' element_list2 ')' ';' }} ; -declare: 'declare' property_list decl_type identifier';' +declare: 'declare' decl_type identifier';' {{ "TYPE" => "DECLARE", - "PROPERTIES" => $_[2], - "NAME" => $_[4], - "DATA" => $_[3], + "NAME" => $_[3], + "DATA" => $_[2], "FILE" => $_[0]->YYData->{FILE}, "LINE" => $_[0]->YYData->{LINE}, }} @@ -136,21 +135,24 @@ declare: 'declare' property_list decl_type identifier';' decl_type: decl_enum | decl_bitmap | decl_union ; -decl_enum: 'enum' +decl_enum: property_list 'enum' {{ - "TYPE" => "ENUM" + "TYPE" => "ENUM", + "PROPERTIES" => $_[1] }} ; -decl_bitmap: 'bitmap' +decl_bitmap: property_list 'bitmap' {{ - "TYPE" => "BITMAP" + "TYPE" => "BITMAP", + "PROPERTIES" => $_[1] }} ; -decl_union: 'union' +decl_union: property_list 'union' {{ - "TYPE" => "UNION" + "TYPE" => "UNION", + "PROPERTIES" => $_[1] }} ; -- cgit