package pfff

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type tok = Parse_info.info
and 'a wrap = 'a * tok
and 'a paren = tok * 'a * tok
and 'a brace = tok * 'a * tok
and 'a bracket = tok * 'a * tok
and 'a comma_list = ('a, tok) Common.either list
and 'a and_list = ('a, tok) Common.either list
and 'a star_list = ('a, tok) Common.either list
and 'a pipe_list = ('a, tok) Common.either list
and 'a semicolon_list = ('a, tok) Common.either list
type name =
  1. | Name of string wrap
and lname = name
and uname = name
type long_name = qualifier * name
and qualifier = (name * tok) list
type ty =
  1. | TyName of long_name
  2. | TyVar of tok * name
  3. | TyTuple of ty star_list
  4. | TyTuple2 of ty star_list paren
  5. | TyFunction of ty * tok * ty
  6. | TyApp of ty_args * long_name
  7. | TyTodo
and ty_args =
  1. | TyArg1 of ty
  2. | TyArgMulti of ty comma_list paren
and expr =
  1. | C of constant
  2. | L of long_name
  3. | Constr of long_name * expr option
  4. | Tuple of expr comma_list
  5. | List of expr semicolon_list bracket
  6. | Sequence of seq_expr paren
  7. | Prefix of string wrap * expr
  8. | Infix of expr * string wrap * expr
  9. | FunCallSimple of long_name * argument list
  10. | FunCall of expr * argument list
  11. | RefAccess of tok * expr
  12. | RefAssign of expr * tok * expr
  13. | FieldAccess of expr * tok * long_name
  14. | FieldAssign of expr * tok * long_name * tok * expr
  15. | Record of record_expr brace
  16. | New of tok * long_name
  17. | ObjAccess of expr * tok * name
  18. | LetIn of tok * rec_opt * let_binding and_list * tok * seq_expr
  19. | Fun of tok * parameter list * match_action
  20. | Function of tok * match_case pipe_list
  21. | If of tok * seq_expr * tok * expr * (tok * expr) option
  22. | Match of tok * seq_expr * tok * match_case pipe_list
  23. | Try of tok * seq_expr * tok * match_case pipe_list
  24. | While of tok * seq_expr * tok * seq_expr * tok
  25. | For of tok * name * tok * seq_expr * for_direction * seq_expr * tok * seq_expr * tok
  26. | ParenExpr of expr paren
  27. | ExprTodo
and seq_expr = expr semicolon_list
and constant =
  1. | Int of string wrap
  2. | Float of string wrap
  3. | Char of string wrap
  4. | String of string wrap
and record_expr =
  1. | RecordNormal of field_and_expr semicolon_list
  2. | RecordWith of expr * tok * field_and_expr semicolon_list
and field_and_expr =
  1. | FieldExpr of long_name * tok * expr
  2. | FieldImplicitExpr of long_name
and argument =
  1. | ArgExpr of expr
  2. | ArgLabelTilde of name * expr
  3. | ArgImplicitTildeExpr of tok * name
  4. | ArgLabelQuestion of name * expr
  5. | ArgImplicitQuestionExpr of tok * name
and match_case = pattern * match_action
and match_action =
  1. | Action of tok * seq_expr
  2. | WhenAction of tok * seq_expr * tok * seq_expr
and for_direction =
  1. | To of tok
  2. | Downto of tok
and rec_opt = tok option
and pattern =
  1. | PatVar of name
  2. | PatConstant of pattern_signed_constant
  3. | PatConstr of long_name * pattern option
  4. | PatConsInfix of pattern * tok * pattern
  5. | PatTuple of pattern comma_list
  6. | PatList of pattern semicolon_list bracket
  7. | PatUnderscore of tok
  8. | PatRecord of field_pattern semicolon_list brace
  9. | PatAs of pattern * tok * name
  10. | PatDisj of pattern * tok * pattern
  11. | PatTyped of tok * pattern * tok * ty * tok
  12. | ParenPat of pattern paren
  13. | PatTodo
and pattern_signed_constant =
  1. | C2 of constant
  2. | CMinus of tok * constant
  3. | CPlus of tok * constant
and field_pattern =
  1. | PatField of long_name * tok * pattern
  2. | PatImplicitField of long_name
and let_binding =
  1. | LetClassic of let_def
  2. | LetPattern of pattern * tok * seq_expr
and let_def = {
  1. l_name : name;
  2. l_params : parameter list;
  3. l_tok : tok;
  4. l_body : seq_expr;
}
and parameter =
  1. | ParamPat of pattern
  2. | ParamTodo
and labeled_simple_pattern = unit
type type_declaration =
  1. | TyAbstract of ty_params * name
  2. | TyDef of ty_params * name * tok * type_def_kind
and ty_params =
  1. | TyNoParam
  2. | TyParam1 of ty_parameter
  3. | TyParamMulti of ty_parameter comma_list paren
and ty_parameter = tok * name
and type_def_kind =
  1. | TyCore of ty
  2. | TyAlgebric of constructor_declaration pipe_list
  3. | TyRecord of field_declaration semicolon_list brace
and constructor_declaration = name * constructor_arguments
and constructor_arguments =
  1. | NoConstrArg
  2. | Of of tok * ty star_list
and field_declaration = {
  1. fld_mutable : tok option;
  2. fld_name : name;
  3. fld_tok : tok;
  4. fld_type : ty;
}
type module_type = unit
type module_expr =
  1. | ModuleName of long_name
  2. | ModuleStruct of tok * item list * tok
  3. | ModuleTodo
and item =
  1. | Type of tok * type_declaration and_list
  2. | Exception of tok * name * constructor_arguments
  3. | External of tok * name * tok * ty * tok * string wrap list
  4. | Open of tok * long_name
  5. | Val of tok * name * tok * ty
  6. | Let of tok * rec_opt * let_binding and_list
  7. | Module of tok * uname * tok * module_expr
  8. | ItemTodo of tok
type sig_item = item
type struct_item = item
type toplevel =
  1. | TopItem of item
  2. | TopSeqExpr of seq_expr
  3. | ScSc of tok
  4. | TopDirective of tok
type program = toplevel list
type any =
  1. | Ty of ty
  2. | Expr of expr
  3. | Pattern of pattern
  4. | Item of item
  5. | Toplevel of toplevel
  6. | Program of program
  7. | TypeDeclaration of type_declaration
  8. | TypeDefKind of type_def_kind
  9. | FieldDeclaration of field_declaration
  10. | MatchCase of match_case
  11. | LetBinding of let_binding
  12. | Constant of constant
  13. | Argument of argument
  14. | Body of seq_expr
  15. | Info of tok
  16. | InfoList of tok list
val str_of_name : name -> string
val info_of_name : name -> tok
val uncomma : ('a, 'b) Common.either list -> 'a list
val unpipe : ('a, 'b) Common.either list -> 'a list
val name_of_long_name : ('a * 'b) -> 'b
val module_of_long_name : ((name * 'a) list * 'b) -> string
val module_infos_of_long_name : ((name * 'a) list * 'b) -> tok list
OCaml

Innovation. Community. Security.