Coccinelle release-1.0.0-rc11
[bpt/coccinelle.git] / popl09 / asttopopl.ml
index 9817a53..e49072c 100644 (file)
@@ -1,5 +1,9 @@
 (*
- * Copyright 2005-2010, Ecole des Mines de Nantes, University of Copenhagen
+ * Copyright 2012, INRIA
+ * Julia Lawall, Gilles Muller
+ * Copyright 2010-2011, 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.
  *
@@ -63,7 +67,10 @@ let rec stm s =
                 Ast.WhenNot(a) -> Past.When(prev,stm_list a)
               | _ -> failwith "only when != supported")
           Past.Dots whencodes)
-  | Ast.Nest(stmt_dots,whencodes,false,_,_) ->
+  | Ast.Nest(starter,stmt_dots,ender,whencodes,false,_,_) ->
+      (match Ast.get_mcodekind starter with
+       Ast.MINUS _ -> failwith "only context nests supported"
+      |        _ -> ());
       let nest = Past.Nest(stm_list stmt_dots) in
       Past.DInfo
        (List.fold_left