package pfff

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tok = Parse_info.t
type 'a wrap = 'a * tok
type 'a bracket = tok * 'a * tok
type name = string wrap
type type_ =
  1. | TBase of name
  2. | TPointer of tok * type_
  3. | TArray of const_expr option * type_
  4. | TFunction of function_type
  5. | TStructName of struct_kind * name
  6. | TEnumName of name
  7. | TTypeName of name
and function_type = type_ * parameter list
and parameter = {
  1. p_type : type_;
  2. p_name : name option;
}
and struct_kind =
  1. | Struct
  2. | Union
and expr =
  1. | Int of string wrap
  2. | Float of string wrap
  3. | String of string wrap
  4. | Char of string wrap
  5. | Id of name
  6. | Call of expr * argument list
  7. | Assign of Cst_cpp.assignOp * expr * expr
  8. | ArrayAccess of expr * expr
  9. | RecordPtAccess of expr * tok * name
  10. | Cast of type_ * expr
  11. | Postfix of expr * Cst_cpp.fixOp wrap
  12. | Infix of expr * Cst_cpp.fixOp wrap
  13. | Unary of expr * Cst_cpp.unaryOp wrap
  14. | Binary of expr * Cst_cpp.binaryOp wrap * expr
  15. | CondExpr of expr * expr * expr
  16. | Sequence of expr * expr
  17. | SizeOf of (expr, type_) Common.either
  18. | ArrayInit of (expr option * expr) list bracket
  19. | RecordInit of (name * expr) list bracket
  20. | GccConstructor of type_ * expr
  21. | Ellipses of tok
and argument = expr
and const_expr = expr
type stmt =
  1. | ExprSt of expr
  2. | Block of stmt list
  3. | If of tok * expr * stmt * stmt
  4. | Switch of tok * expr * case list
  5. | While of tok * expr * stmt
  6. | DoWhile of tok * stmt * expr
  7. | For of tok * expr option * expr option * expr option * stmt
  8. | Return of tok * expr option
  9. | Continue of tok
  10. | Break of tok
  11. | Label of name * stmt
  12. | Goto of tok * name
  13. | Vars of var_decl list
  14. | Asm of expr list
and case =
  1. | Case of tok * expr * stmt list
  2. | Default of tok * stmt list
and var_decl = {
  1. v_name : name;
  2. v_type : type_;
  3. v_storage : storage;
  4. v_init : initialiser option;
}
and initialiser = expr
and storage =
  1. | Extern
  2. | Static
  3. | DefaultStorage
type func_def = {
  1. f_name : name;
  2. f_type : function_type;
  3. f_body : stmt list;
  4. f_static : bool;
}
type struct_def = {
  1. s_name : name;
  2. s_kind : struct_kind;
  3. s_flds : field_def list bracket;
}
and field_def = {
  1. fld_name : name option;
  2. fld_type : type_;
}
type enum_def = name * (name * const_expr option) list
type type_def = name * type_
type define_body =
  1. | CppExpr of expr
  2. | CppStmt of stmt
type toplevel =
  1. | Include of tok * string wrap
  2. | Define of name * define_body
  3. | Macro of name * name list * define_body
  4. | StructDef of struct_def
  5. | TypeDef of type_def
  6. | EnumDef of enum_def
  7. | FuncDef of func_def
  8. | Global of var_decl
  9. | Prototype of func_def
type program = toplevel list
type any =
  1. | Expr of expr
  2. | Stmt of stmt
  3. | Stmts of stmt list
  4. | Type of type_
  5. | Toplevel of toplevel
  6. | Program of program
val str_of_name : ('a * 'b) -> 'a
val looks_like_macro : (string * 'a) -> bool
val unwrap : ('a * 'b) -> 'a
OCaml

Innovation. Community. Security.