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 'a bracket = tok * 'a * tok
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. | Final
  6. | Static
  7. | Transient
  8. | Volatile
  9. | Native
  10. | StrictFP
  11. | Synchronized
  12. | Variadic
  13. | Annotation of annotation
and modifiers = modifier wrap list
and annotation = name_or_class_type * annotation_element option
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 bracket option
  6. | NewArray of typ * arguments * int * init option
  7. | NewQualifiedClass of expr * ident * arguments * decls bracket option
  8. | Call of expr * arguments
  9. | Dot of expr * tok * 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 * tok * expr
  19. | AssignOp of expr * Ast_generic.arithmetic_operator wrap * expr
  20. | Lambda of parameters * stmt
  21. | Ellipsis 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 stmt =
  1. | Empty
  2. | Block of stmts
  3. | Expr of expr
  4. | If of tok * expr * stmt * stmt
  5. | Switch of tok * expr * (cases * stmts) list
  6. | While of tok * expr * stmt
  7. | Do of tok * stmt * expr
  8. | For of tok * for_control * stmt
  9. | Break of tok * ident option
  10. | Continue of tok * ident option
  11. | Return of tok * expr option
  12. | Label of ident * stmt
  13. | Sync of expr * stmt
  14. | Try of tok * stmt * catches * (tok * stmt) option
  15. | Throw of tok * expr
  16. | LocalVar of var_with_init
  17. | LocalClass of class_decl
  18. | Assert of tok * expr * expr option
and stmts = stmt list
and case =
  1. | Case of tok * expr
  2. | Default of tok
and cases = case list
and for_control =
  1. | ForClassic of for_init * expr list * expr list
  2. | Foreach of var_definition * expr
and for_init =
  1. | ForInitVars of var_with_init list
  2. | ForInitExprs of expr list
and catch = tok * var_definition * stmt
and catches = catch list
and entity = {
  1. name : ident;
  2. mods : modifiers;
  3. type_ : typ option;
}
and var_definition = entity
and vars = var_definition list
and var_with_init = {
  1. f_var : var_definition;
  2. f_init : init option;
}
and init =
  1. | ExprInit of expr
  2. | ArrayInit of init list bracket
and method_decl = {
  1. m_var : var_definition;
  2. m_formals : parameters;
  3. m_throws : qualified_ident list;
  4. m_body : stmt;
}
and parameters = parameter_binding list
and parameter_binding =
  1. | ParamClassic of parameter
  2. | ParamEllipsis of tok
and parameter = var_definition
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 bracket;
}
and class_kind =
  1. | ClassRegular
  2. | Interface
and decl =
  1. | Class of class_decl
  2. | Enum of enum_decl
  3. | Method of method_decl
  4. | Field of field
  5. | Init of bool * stmt
  6. | DeclEllipsis of tok
and decls = decl list
type import =
  1. | ImportAll of tok * qualified_ident * tok
  2. | ImportFrom of tok * qualified_ident * ident
type compilation_unit = {
  1. package : (tok * qualified_ident) option;
  2. imports : (bool * import) list;
  3. decls : decls;
}
type program = compilation_unit
type any =
  1. | AIdent of ident
  2. | AExpr of expr
  3. | AStmt of stmt
  4. | AStmts of stmt list
  5. | ATyp of typ
  6. | AVar of var_definition
  7. | AInit of init
  8. | AMethod of method_decl
  9. | AField of field
  10. | AClass of class_decl
  11. | ADecl of decl
  12. | ADecls of decls
  13. | 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