Coccinelle release-1.0.0-rc11
[bpt/coccinelle.git] / parsing_c / ast_c.ml
index 450b5a9..b62c388 100644 (file)
@@ -331,7 +331,7 @@ and expression = (expressionbis * exp_info ref (* semantic: *)) wrap3
 
   (* gccext: *)
   | StatementExpr of compound wrap (* ( )     new scope *)
-  | Constructor  of fullType * initialiser wrap2 (* , *) list
+  | Constructor  of fullType * initialiser
 
   (* for unparser: *)
   | ParenExpr of expression
@@ -517,6 +517,8 @@ and declaration =
   (* cppext: *)
     (* bool is true if there is a ; at the end *)
   | MacroDecl of (string * argument wrap2 list * bool) wrap (* fakestart *)
+  | MacroDeclInit of
+      (string * argument wrap2 list * initialiser) wrap (* fakestart *)
 
      and onedecl =
        { v_namei: (name * v_init) option;
@@ -1216,8 +1218,8 @@ let info_of_type ft =
   (* bugfix: because of string->name, the ii can be deeper *)
   let ii = get_local_ii_of_tybis_inlining_ii_of_name ty in
   match ii with
-  | ii::_ -> ii.pinfo
-  | [] -> failwith "type has no text; need to think again"
+  | ii::_ -> Some ii.pinfo
+  | [] -> None
 
 (* only Label and Goto have name *)
 let get_local_ii_of_st_inlining_ii_of_name st =