Coccinelle release 1.0.0-rc15
[bpt/coccinelle.git] / parsing_cocci / ast0_cocci.mli
index 53f7a57..72d8df0 100644 (file)
@@ -101,6 +101,7 @@ and base_ident =
        Ast_cocci.seed * pure
   | MetaFunc      of Ast_cocci.meta_name mcode * Ast_cocci.idconstraint * pure
   | MetaLocalFunc of Ast_cocci.meta_name mcode * Ast_cocci.idconstraint * pure
+  | AsIdent       of ident * ident (* as ident, always metavar *)
   | DisjId        of string mcode * ident list *
                      string mcode list (* the |s *) * string mcode
   | OptIdent      of ident
@@ -321,8 +322,7 @@ and base_statement =
                      string mcode (* while *) * string mcode (* ( *) *
                     expression * string mcode (* ) *) *
                      string mcode (* ; *)
-  | For           of string mcode (* for *) * string mcode (* ( *) *
-                     expression option * string mcode (*;*) *
+  | For           of string mcode (* for *) * string mcode (* ( *) * forinfo *
                     expression option * string mcode (*;*) *
                      expression option * string mcode (* ) *) * statement *
                     (info * mcodekind) (* after info *)
@@ -370,6 +370,12 @@ and base_statement =
   | OptStm   of statement
   | UniqueStm of statement
 
+and base_forinfo =
+    ForExp of expression option * string mcode (*;*)
+  | ForDecl of (info * mcodekind) (* before the decl *) * declaration
+
+and forinfo = base_forinfo wrap
+
 and fninfo =
     FStorage of Ast_cocci.storage mcode
   | FType of typeC
@@ -462,6 +468,7 @@ and anything =
   | InitTag of initialiser
   | DeclTag of declaration
   | StmtTag of statement
+  | ForInfoTag of forinfo
   | CaseLineTag of case_line
   | TopTag of top_level
   | IsoWhenTag of Ast_cocci.when_modifier (*only for when code, in iso phase*)
@@ -483,6 +490,7 @@ val param : parameterTypeDef -> anything
 val ini : initialiser -> anything
 val decl : declaration -> anything
 val stmt : statement -> anything
+val forinfo : forinfo -> anything
 val case_line : case_line -> anything
 val top : top_level -> anything