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 list1 = 'a list
type ident = string wrap
type qualified_ident = ident list
type typ =
  1. | TBasic of string wrap
  2. | TClass of class_type
  3. | TArray of typ
and class_type = (ident * type_argument list) list1
and type_argument =
  1. | TArgument of ref_type
  2. | TQuestion of (bool * ref_type) option
and ref_type = typ
type type_parameter =
  1. | TParam of ident * ref_type list
type modifier =
  1. | Public
  2. | Protected
  3. | Private
  4. | Abstract
  5. | Static
  6. | Final
  7. | StrictFP
  8. | Transient
  9. | Volatile
  10. | Synchronized
  11. | Native
  12. | Annotation of annotation
and annotation = name_or_class_type * annotation_element option
and modifiers = modifier wrap list
and annotation_element =
  1. | AnnotArgValue of element_value
  2. | AnnotArgPairInit of annotation_pair list
  3. | EmptyAnnotArg
and element_value =
  1. | AnnotExprInit of expr
  2. | AnnotNestedAnnot of annotation
  3. | AnnotArrayInit of element_value list
and annotation_pair = ident * element_value
and name_or_class_type = identifier_ list
and identifier_ =
  1. | Id of ident
  2. | Id_then_TypeArgs of ident * type_argument list
  3. | TypeArgs_then_Id of type_argument list * identifier_
and name = (type_argument list * ident) list1
and expr =
  1. | Name of name
  2. | NameOrClassType of name_or_class_type
  3. | Literal of literal
  4. | ClassLiteral of typ
  5. | NewClass of typ * arguments * decls option
  6. | NewArray of typ * arguments * int * init option
  7. | NewQualifiedClass of expr * ident * arguments * decls option
  8. | Call of expr * arguments
  9. | Dot of expr * ident
  10. | ArrayAccess of expr * expr
  11. | Unary of Ast_generic.arithmetic_operator wrap * expr
  12. | Postfix of expr * Ast_generic.incr_decr wrap
  13. | Prefix of Ast_generic.incr_decr wrap * expr
  14. | Infix of expr * Ast_generic.arithmetic_operator wrap * expr
  15. | Cast of typ * expr
  16. | InstanceOf of expr * ref_type
  17. | Conditional of expr * expr * expr
  18. | Assign of expr * expr
  19. | AssignOp of expr * Ast_generic.arithmetic_operator wrap * expr
  20. | Ellipses of tok
and literal =
  1. | Int of string wrap
  2. | Float of string wrap
  3. | String of string wrap
  4. | Char of string wrap
  5. | Bool of bool wrap
  6. | Null of tok
and arguments = expr list
and op = string
and stmt =
  1. | Empty
  2. | Block of stmts
  3. | Expr of expr
  4. | If of expr * stmt * stmt
  5. | Switch of expr * (cases * stmts) list
  6. | While of expr * stmt
  7. | Do of stmt * expr
  8. | For of for_control * stmt
  9. | Break of ident option
  10. | Continue of ident option
  11. | Return of expr option
  12. | Label of ident * stmt
  13. | Sync of expr * stmt
  14. | Try of stmt * catches * stmt option
  15. | Throw of expr
  16. | LocalVar of var_with_init
  17. | LocalClass of class_decl
  18. | Assert of expr * expr option
and stmts = stmt list
and case =
  1. | Case of expr
  2. | Default
and cases = case list
and for_control =
  1. | ForClassic of for_init * expr list * expr list
  2. | Foreach of var * expr
and for_init =
  1. | ForInitVars of var_with_init list
  2. | ForInitExprs of expr list
and catch = var * stmt
and catches = catch list
and var = {
  1. v_name : ident;
  2. v_mods : modifiers;
  3. v_type : typ;
}
and vars = var list
and var_with_init = {
  1. f_var : var;
  2. f_init : init option;
}
and init =
  1. | ExprInit of expr
  2. | ArrayInit of init list
and method_decl = {
  1. m_var : var;
  2. m_formals : vars;
  3. m_throws : qualified_ident list;
  4. m_body : stmt;
}
and field = var_with_init
and enum_decl = {
  1. en_name : ident;
  2. en_mods : modifiers;
  3. en_impls : ref_type list;
  4. en_body : enum_constant list * decls;
}
and enum_constant =
  1. | EnumSimple of ident
  2. | EnumConstructor of ident * arguments
  3. | EnumWithMethods of ident * method_decl list
and class_decl = {
  1. cl_name : ident;
  2. cl_kind : class_kind;
  3. cl_tparams : type_parameter list;
  4. cl_mods : modifiers;
  5. cl_extends : typ option;
  6. cl_impls : ref_type list;
  7. cl_body : decls;
}
and class_kind =
  1. | ClassRegular
  2. | Interface
and decl =
  1. | Class of class_decl
  2. | Method of method_decl
  3. | Field of field
  4. | Enum of enum_decl
  5. | Init of bool * stmt
and decls = decl list
type compilation_unit = {
  1. package : qualified_ident option;
  2. imports : (bool * qualified_ident) list;
  3. decls : decls;
}
type program = compilation_unit
type any =
  1. | AIdent of ident
  2. | AExpr of expr
  3. | AStmt of stmt
  4. | ATyp of typ
  5. | AVar of var
  6. | AInit of init
  7. | AMethod of method_decl
  8. | AField of field
  9. | AClass of class_decl
  10. | ADecl of decl
  11. | AProgram of program
val unwrap : ('a * 'b) -> 'a
val fakeInfo : ?next_to:(Parse_info.token_location * int) option -> string -> Parse_info.token_mutable
val ast_todo : 'a list
val ast_todo2 : unit
val info_of_ident : ('a * 'b) -> 'b
val is_final : (modifier * 'a) list -> bool
val is_final_static : (modifier * 'a) list -> bool
val info_of_identifier_ : identifier_ -> tok
OCaml

Innovation. Community. Security.