+(*
+ * Copyright 2010, INRIA, University of Copenhagen
+ * Julia Lawall, Rene Rydhof Hansen, Gilles Muller, Nicolas Palix
+ * Copyright 2005-2009, Ecole des Mines de Nantes, University of Copenhagen
+ * Yoann Padioleau, Julia Lawall, Rene Rydhof Hansen, Henrik Stuart, Gilles Muller, Nicolas Palix
+ * This file is part of Coccinelle.
+ *
+ * Coccinelle is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, according to version 2 of the License.
+ *
+ * Coccinelle is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with Coccinelle. If not, see <http://www.gnu.org/licenses/>.
+ *
+ * The authors reserve the right to distribute this or future versions of
+ * Coccinelle under other licenses.
+ *)
+
+
(* Find a directive or comment at the end of a statement. Things with aft
given None, because they can accomodate their own directives or comments *)
| Ast0.Include(inc,name) ->
call_right right_mcode name s
(function name -> Ast0.Include(inc,name))
+ | Ast0.Undef(def,id) ->
+ (* nothing available for ident, and not sure code can appear
+ here anyway *)
+ None
| Ast0.Define(def,id,params,body) ->
call_right right_statement_dots body s
(function body -> Ast0.Define(def,id,params,body))
call_right left_ty ty t (function ty -> Ast0.Array(ty,lb,size,rb))
| Ast0.EnumName(kind,name) ->
call_right left_mcode kind t (function kind -> Ast0.EnumName(kind,name))
+ | Ast0.EnumDef(ty,lb,ids,rb) ->
+ call_right left_ty ty t
+ (function ty -> Ast0.EnumDef(ty,lb,ids,rb))
| Ast0.StructUnionName(kind,name) ->
call_right left_mcode kind t
(function kind -> Ast0.StructUnionName(kind,name))