summaryrefslogtreecommitdiff
path: root/cparser/C.mli
diff options
context:
space:
mode:
Diffstat (limited to 'cparser/C.mli')
-rw-r--r--cparser/C.mli51
1 files changed, 26 insertions, 25 deletions
diff --git a/cparser/C.mli b/cparser/C.mli
index b1e44eb..71ab1d4 100644
--- a/cparser/C.mli
+++ b/cparser/C.mli
@@ -25,7 +25,7 @@ type ident =
{ name: string; (* name as in the source *)
stamp: int } (* unique ID *)
-(* kinds of integers *)
+(* Kinds of integers *)
type ikind =
| IBool (** [_Bool] *)
@@ -153,6 +153,18 @@ type typ =
| TUnion of ident * attributes
| TEnum of ident * attributes
+(** Struct or union field *)
+
+type field = {
+ fld_name: string;
+ fld_typ: typ;
+ fld_bitfield: int option
+}
+
+type struct_or_union =
+ | Struct
+ | Union
+
(** Expressions *)
type exp = { edesc: exp_desc; etyp: typ }
@@ -167,8 +179,17 @@ and exp_desc =
(* the type at which the operation is performed *)
| EConditional of exp * exp * exp
| ECast of typ * exp
+ | ECompound of typ * init
| ECall of exp * exp list
+(** Initializers *)
+
+and init =
+ | Init_single of exp
+ | Init_array of init list
+ | Init_struct of ident * (field * init) list
+ | Init_union of ident * field * init
+
(** Statements *)
type stmt = { sdesc: stmt_desc; sloc: location }
@@ -201,30 +222,6 @@ and slabel =
and decl =
storage * ident * typ * init option
-(** Initializers *)
-
-and init =
- | Init_single of exp
- | Init_array of init list
- | Init_struct of ident * (field * init) list
- | Init_union of ident * field * init
-
-(** Struct or union field *)
-
-and field = {
- fld_name: string;
- fld_typ: typ;
- fld_bitfield: int option
-}
-
-type struct_or_union =
- | Struct
- | Union
-
-(** Enumerator *)
-
-type enumerator = ident * int64 * exp option
-
(** Function definitions *)
type fundef = {
@@ -239,6 +236,10 @@ type fundef = {
fd_body: stmt
}
+(** Element of an enumeration *)
+
+type enumerator = ident * int64 * exp option
+
(** Global declarations *)
type globdecl =