package rotor

  1. Overview
  2. Docs
An automatic refactoring tool for OCaml

Install

Dune Dependency

Authors

Maintainers

Sources

rotor-0.1.zip
md5=372ca9b6a7af2fdd99d5117d376870b4
sha512=6f5473951437a48bf9ae7a5d22a4283c02bed6a6e5c7bc02fc5f28dc5c28720f3e2c69f32a2a0c5b9447c2bc8c83746bb4de5b67909a98cc8921527582727063

doc/rotor/Parsetree_visitors/index.html

Module Parsetree_visitors

type pt_constant = Parsetree.constant =
  1. | Pconst_integer of string * char option
  2. | Pconst_char of char
  3. | Pconst_string of string * string option
  4. | Pconst_float of string * char option
and pt_attribute = Parsetree.attribute = {
  1. attr_name : string Asttypes.loc;
  2. attr_payload : pt_payload;
  3. attr_loc : Location_visitors.location_t;
}
and pt_extension = string Asttypes.loc * pt_payload
and pt_attributes = pt_attribute list
and pt_payload = Parsetree.payload =
  1. | PStr of pt_structure
  2. | PSig of pt_signature
  3. | PTyp of pt_core_type
  4. | PPat of pt_pattern * pt_expression option
and pt_core_type = Parsetree.core_type = {
  1. ptyp_desc : pt_core_type_desc;
  2. ptyp_loc : Location_visitors.location_t;
  3. ptyp_loc_stack : Location_visitors.location_t list;
  4. ptyp_attributes : pt_attributes;
}
and pt_core_type_desc = Parsetree.core_type_desc =
  1. | Ptyp_any
  2. | Ptyp_var of string
  3. | Ptyp_arrow of Asttypes.arg_label * pt_core_type * pt_core_type
  4. | Ptyp_tuple of pt_core_type list
  5. | Ptyp_constr of Longident_visitors.longident_t Asttypes.loc * pt_core_type list
  6. | Ptyp_object of pt_object_field list * Asttypes.closed_flag
  7. | Ptyp_class of Longident_visitors.longident_t Asttypes.loc * pt_core_type list
  8. | Ptyp_alias of pt_core_type * string
  9. | Ptyp_variant of pt_row_field list * Asttypes.closed_flag * Asttypes.label list option
  10. | Ptyp_poly of string Asttypes.loc list * pt_core_type
  11. | Ptyp_package of pt_package_type
  12. | Ptyp_extension of pt_extension
and pt_package_type = Longident_visitors.longident_t Asttypes.loc * (Longident_visitors.longident_t Asttypes.loc * pt_core_type) list
and pt_row_field = Parsetree.row_field = {
  1. prf_desc : pt_row_field_desc;
  2. prf_loc : Location_visitors.location_t;
  3. prf_attributes : pt_attributes;
}
and pt_row_field_desc = Parsetree.row_field_desc =
  1. | Rtag of Asttypes.label Asttypes.loc * bool * pt_core_type list
  2. | Rinherit of pt_core_type
and pt_object_field = Parsetree.object_field = {
  1. pof_desc : pt_object_field_desc;
  2. pof_loc : Location_visitors.location_t;
  3. pof_attributes : pt_attributes;
}
and pt_object_field_desc = Parsetree.object_field_desc =
  1. | Otag of Asttypes.label Asttypes.loc * pt_core_type
  2. | Oinherit of pt_core_type
and pt_pattern = Parsetree.pattern = {
  1. ppat_desc : pt_pattern_desc;
  2. ppat_loc : Location_visitors.location_t;
  3. ppat_loc_stack : Location_visitors.location_t list;
  4. ppat_attributes : pt_attributes;
}
and pt_pattern_desc = Parsetree.pattern_desc =
  1. | Ppat_any
  2. | Ppat_var of string Asttypes.loc
  3. | Ppat_alias of pt_pattern * string Asttypes.loc
  4. | Ppat_constant of pt_constant
  5. | Ppat_interval of pt_constant * pt_constant
  6. | Ppat_tuple of pt_pattern list
  7. | Ppat_construct of Longident_visitors.longident_t Asttypes.loc * pt_pattern option
  8. | Ppat_variant of Asttypes.label * pt_pattern option
  9. | Ppat_record of (Longident_visitors.longident_t Asttypes.loc * pt_pattern) list * Asttypes.closed_flag
  10. | Ppat_array of pt_pattern list
  11. | Ppat_or of pt_pattern * pt_pattern
  12. | Ppat_constraint of pt_pattern * pt_core_type
  13. | Ppat_type of Longident_visitors.longident_t Asttypes.loc
  14. | Ppat_lazy of pt_pattern
  15. | Ppat_unpack of string Asttypes.loc
  16. | Ppat_exception of pt_pattern
  17. | Ppat_extension of pt_extension
  18. | Ppat_open of Longident_visitors.longident_t Asttypes.loc * pt_pattern
and pt_expression = Parsetree.expression = {
  1. pexp_desc : pt_expression_desc;
  2. pexp_loc : Location_visitors.location_t;
  3. pexp_loc_stack : Location_visitors.location_t list;
  4. pexp_attributes : pt_attributes;
}
and pt_expression_desc = Parsetree.expression_desc =
  1. | Pexp_ident of Longident_visitors.longident_t Asttypes.loc
  2. | Pexp_constant of pt_constant
  3. | Pexp_let of Asttypes.rec_flag * pt_value_binding list * pt_expression
  4. | Pexp_function of pt_case list
  5. | Pexp_fun of Asttypes.arg_label * pt_expression option * pt_pattern * pt_expression
  6. | Pexp_apply of pt_expression * (Asttypes.arg_label * pt_expression) list
  7. | Pexp_match of pt_expression * pt_case list
  8. | Pexp_try of pt_expression * pt_case list
  9. | Pexp_tuple of pt_expression list
  10. | Pexp_construct of Longident_visitors.longident_t Asttypes.loc * pt_expression option
  11. | Pexp_variant of Asttypes.label * pt_expression option
  12. | Pexp_record of (Longident_visitors.longident_t Asttypes.loc * pt_expression) list * pt_expression option
  13. | Pexp_field of pt_expression * Longident_visitors.longident_t Asttypes.loc
  14. | Pexp_setfield of pt_expression * Longident_visitors.longident_t Asttypes.loc * pt_expression
  15. | Pexp_array of pt_expression list
  16. | Pexp_ifthenelse of pt_expression * pt_expression * pt_expression option
  17. | Pexp_sequence of pt_expression * pt_expression
  18. | Pexp_while of pt_expression * pt_expression
  19. | Pexp_for of pt_pattern * pt_expression * pt_expression * Asttypes.direction_flag * pt_expression
  20. | Pexp_constraint of pt_expression * pt_core_type
  21. | Pexp_coerce of pt_expression * pt_core_type option * pt_core_type
  22. | Pexp_send of pt_expression * Asttypes.label Asttypes.loc
  23. | Pexp_new of Longident_visitors.longident_t Asttypes.loc
  24. | Pexp_setinstvar of Asttypes.label Asttypes.loc * pt_expression
  25. | Pexp_override of (Asttypes.label Asttypes.loc * pt_expression) list
  26. | Pexp_letmodule of string Asttypes.loc * pt_module_expr * pt_expression
  27. | Pexp_letexception of pt_extension_constructor * pt_expression
  28. | Pexp_assert of pt_expression
  29. | Pexp_lazy of pt_expression
  30. | Pexp_poly of pt_expression * pt_core_type option
  31. | Pexp_object of pt_class_structure
  32. | Pexp_newtype of string Asttypes.loc * pt_expression
  33. | Pexp_pack of pt_module_expr
  34. | Pexp_open of pt_open_declaration * pt_expression
  35. | Pexp_letop of pt_letop
  36. | Pexp_extension of pt_extension
  37. | Pexp_unreachable
and pt_case = Parsetree.case = {
  1. pc_lhs : pt_pattern;
  2. pc_guard : pt_expression option;
  3. pc_rhs : pt_expression;
}
and pt_letop = Parsetree.letop = {
  1. let_ : pt_binding_op;
  2. ands : pt_binding_op list;
  3. body : pt_expression;
}
and pt_binding_op = Parsetree.binding_op = {
  1. pbop_op : string Asttypes.loc;
  2. pbop_pat : pt_pattern;
  3. pbop_exp : pt_expression;
  4. pbop_loc : Location_visitors.location_t;
}
and pt_value_description = Parsetree.value_description = {
  1. pval_name : string Asttypes.loc;
  2. pval_type : pt_core_type;
  3. pval_prim : string list;
  4. pval_attributes : pt_attributes;
  5. pval_loc : Location_visitors.location_t;
}
and pt_type_declaration = Parsetree.type_declaration = {
  1. ptype_name : string Asttypes.loc;
  2. ptype_params : (pt_core_type * Asttypes.variance) list;
  3. ptype_cstrs : (pt_core_type * pt_core_type * Location_visitors.location_t) list;
  4. ptype_kind : pt_type_kind;
  5. ptype_private : Asttypes.private_flag;
  6. ptype_manifest : pt_core_type option;
  7. ptype_attributes : pt_attributes;
  8. ptype_loc : Location_visitors.location_t;
}
and pt_type_kind = Parsetree.type_kind =
  1. | Ptype_abstract
  2. | Ptype_variant of pt_constructor_declaration list
  3. | Ptype_record of pt_label_declaration list
  4. | Ptype_open
and pt_label_declaration = Parsetree.label_declaration = {
  1. pld_name : string Asttypes.loc;
  2. pld_mutable : Asttypes.mutable_flag;
  3. pld_type : pt_core_type;
  4. pld_loc : Location_visitors.location_t;
  5. pld_attributes : pt_attributes;
}
and pt_constructor_declaration = Parsetree.constructor_declaration = {
  1. pcd_name : string Asttypes.loc;
  2. pcd_args : pt_constructor_arguments;
  3. pcd_res : pt_core_type option;
  4. pcd_loc : Location_visitors.location_t;
  5. pcd_attributes : pt_attributes;
}
and pt_constructor_arguments = Parsetree.constructor_arguments =
  1. | Pcstr_tuple of pt_core_type list
  2. | Pcstr_record of pt_label_declaration list
and pt_type_extension = Parsetree.type_extension = {
  1. ptyext_path : Longident_visitors.longident_t Asttypes.loc;
  2. ptyext_params : (pt_core_type * Asttypes.variance) list;
  3. ptyext_constructors : pt_extension_constructor list;
  4. ptyext_private : Asttypes.private_flag;
  5. ptyext_loc : Location_visitors.location_t;
  6. ptyext_attributes : pt_attributes;
}
and pt_extension_constructor = Parsetree.extension_constructor = {
  1. pext_name : string Asttypes.loc;
  2. pext_kind : pt_extension_constructor_kind;
  3. pext_loc : Location_visitors.location_t;
  4. pext_attributes : pt_attributes;
}
and pt_type_exception = Parsetree.type_exception = {
  1. ptyexn_constructor : pt_extension_constructor;
  2. ptyexn_loc : Location_visitors.location_t;
  3. ptyexn_attributes : pt_attributes;
}
and pt_extension_constructor_kind = Parsetree.extension_constructor_kind =
  1. | Pext_decl of pt_constructor_arguments * pt_core_type option
  2. | Pext_rebind of Longident_visitors.longident_t Asttypes.loc
and pt_class_type = Parsetree.class_type = {
  1. pcty_desc : pt_class_type_desc;
  2. pcty_loc : Location_visitors.location_t;
  3. pcty_attributes : pt_attributes;
}
and pt_class_type_desc = Parsetree.class_type_desc =
  1. | Pcty_constr of Longident_visitors.longident_t Asttypes.loc * pt_core_type list
  2. | Pcty_signature of pt_class_signature
  3. | Pcty_arrow of Asttypes.arg_label * pt_core_type * pt_class_type
  4. | Pcty_extension of pt_extension
  5. | Pcty_open of pt_open_description * pt_class_type
and pt_class_signature = Parsetree.class_signature = {
  1. pcsig_self : pt_core_type;
  2. pcsig_fields : pt_class_type_field list;
}
and pt_class_type_field = Parsetree.class_type_field = {
  1. pctf_desc : pt_class_type_field_desc;
  2. pctf_loc : Location_visitors.location_t;
  3. pctf_attributes : pt_attributes;
}
and pt_class_type_field_desc = Parsetree.class_type_field_desc =
  1. | Pctf_inherit of pt_class_type
  2. | Pctf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag * Asttypes.virtual_flag * pt_core_type
  3. | Pctf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag * Asttypes.virtual_flag * pt_core_type
  4. | Pctf_constraint of pt_core_type * pt_core_type
  5. | Pctf_attribute of pt_attribute
  6. | Pctf_extension of pt_extension
and 'a pt_class_infos = 'a Parsetree.class_infos = {
  1. pci_virt : Asttypes.virtual_flag;
  2. pci_params : (pt_core_type * Asttypes.variance) list;
  3. pci_name : string Asttypes.loc;
  4. pci_expr : 'a;
  5. pci_loc : Location_visitors.location_t;
  6. pci_attributes : pt_attributes;
}
and pt_class_description = pt_class_type pt_class_infos
and pt_class_type_declaration = pt_class_type pt_class_infos
and pt_class_expr = Parsetree.class_expr = {
  1. pcl_desc : pt_class_expr_desc;
  2. pcl_loc : Location_visitors.location_t;
  3. pcl_attributes : pt_attributes;
}
and pt_class_expr_desc = Parsetree.class_expr_desc =
  1. | Pcl_constr of Longident_visitors.longident_t Asttypes.loc * pt_core_type list
  2. | Pcl_structure of pt_class_structure
  3. | Pcl_fun of Asttypes.arg_label * pt_expression option * pt_pattern * pt_class_expr
  4. | Pcl_apply of pt_class_expr * (Asttypes.arg_label * pt_expression) list
  5. | Pcl_let of Asttypes.rec_flag * pt_value_binding list * pt_class_expr
  6. | Pcl_constraint of pt_class_expr * pt_class_type
  7. | Pcl_extension of pt_extension
  8. | Pcl_open of pt_open_description * pt_class_expr
and pt_class_structure = Parsetree.class_structure = {
  1. pcstr_self : pt_pattern;
  2. pcstr_fields : pt_class_field list;
}
and pt_class_field = Parsetree.class_field = {
  1. pcf_desc : pt_class_field_desc;
  2. pcf_loc : Location_visitors.location_t;
  3. pcf_attributes : pt_attributes;
}
and pt_class_field_desc = Parsetree.class_field_desc =
  1. | Pcf_inherit of Asttypes.override_flag * pt_class_expr * string Asttypes.loc option
  2. | Pcf_val of Asttypes.label Asttypes.loc * Asttypes.mutable_flag * pt_class_field_kind
  3. | Pcf_method of Asttypes.label Asttypes.loc * Asttypes.private_flag * pt_class_field_kind
  4. | Pcf_constraint of pt_core_type * pt_core_type
  5. | Pcf_initializer of pt_expression
  6. | Pcf_attribute of pt_attribute
  7. | Pcf_extension of pt_extension
and pt_class_field_kind = Parsetree.class_field_kind =
  1. | Cfk_virtual of pt_core_type
  2. | Cfk_concrete of Asttypes.override_flag * pt_expression
and pt_class_declaration = pt_class_expr pt_class_infos
and pt_module_type = Parsetree.module_type = {
  1. pmty_desc : pt_module_type_desc;
  2. pmty_loc : Location_visitors.location_t;
  3. pmty_attributes : pt_attributes;
}
and pt_module_type_desc = Parsetree.module_type_desc =
  1. | Pmty_ident of Longident_visitors.longident_t Asttypes.loc
  2. | Pmty_signature of pt_signature
  3. | Pmty_functor of string Asttypes.loc * pt_module_type option * pt_module_type
  4. | Pmty_with of pt_module_type * pt_with_constraint list
  5. | Pmty_typeof of pt_module_expr
  6. | Pmty_extension of pt_extension
  7. | Pmty_alias of Longident_visitors.longident_t Asttypes.loc
and pt_signature = pt_signature_item list
and pt_signature_item = Parsetree.signature_item = {
  1. psig_desc : pt_signature_item_desc;
  2. psig_loc : Location_visitors.location_t;
}
and pt_signature_item_desc = Parsetree.signature_item_desc =
  1. | Psig_value of pt_value_description
  2. | Psig_type of Asttypes.rec_flag * pt_type_declaration list
  3. | Psig_typesubst of pt_type_declaration list
  4. | Psig_typext of pt_type_extension
  5. | Psig_exception of pt_type_exception
  6. | Psig_module of pt_module_declaration
  7. | Psig_modsubst of pt_module_substitution
  8. | Psig_recmodule of pt_module_declaration list
  9. | Psig_modtype of pt_module_type_declaration
  10. | Psig_open of pt_open_description
  11. | Psig_include of pt_include_description
  12. | Psig_class of pt_class_description list
  13. | Psig_class_type of pt_class_type_declaration list
  14. | Psig_attribute of pt_attribute
  15. | Psig_extension of pt_extension * pt_attributes
and pt_module_declaration = Parsetree.module_declaration = {
  1. pmd_name : string Asttypes.loc;
  2. pmd_type : pt_module_type;
  3. pmd_attributes : pt_attributes;
  4. pmd_loc : Location_visitors.location_t;
}
and pt_module_substitution = Parsetree.module_substitution = {
  1. pms_name : string Asttypes.loc;
  2. pms_manifest : Longident_visitors.longident_t Asttypes.loc;
  3. pms_attributes : pt_attributes;
  4. pms_loc : Location_visitors.location_t;
}
and pt_module_type_declaration = Parsetree.module_type_declaration = {
  1. pmtd_name : string Asttypes.loc;
  2. pmtd_type : pt_module_type option;
  3. pmtd_attributes : pt_attributes;
  4. pmtd_loc : Location_visitors.location_t;
}
and 'a pt_open_infos = 'a Parsetree.open_infos = {
  1. popen_expr : 'a;
  2. popen_override : Asttypes.override_flag;
  3. popen_loc : Location_visitors.location_t;
  4. popen_attributes : pt_attributes;
}
and pt_open_description = Longident_visitors.longident_t Asttypes.loc pt_open_infos
and pt_open_declaration = pt_module_expr pt_open_infos
and 'a pt_include_infos = 'a Parsetree.include_infos = {
  1. pincl_mod : 'a;
  2. pincl_loc : Location_visitors.location_t;
  3. pincl_attributes : pt_attributes;
}
and pt_include_description = pt_module_type pt_include_infos
and pt_include_declaration = pt_module_expr pt_include_infos
and pt_with_constraint = Parsetree.with_constraint =
  1. | Pwith_type of Longident_visitors.longident_t Asttypes.loc * pt_type_declaration
  2. | Pwith_module of Longident_visitors.longident_t Asttypes.loc * Longident_visitors.longident_t Asttypes.loc
  3. | Pwith_typesubst of Longident_visitors.longident_t Asttypes.loc * pt_type_declaration
  4. | Pwith_modsubst of Longident_visitors.longident_t Asttypes.loc * Longident_visitors.longident_t Asttypes.loc
and pt_module_expr = Parsetree.module_expr = {
  1. pmod_desc : pt_module_expr_desc;
  2. pmod_loc : Location_visitors.location_t;
  3. pmod_attributes : pt_attributes;
}
and pt_module_expr_desc = Parsetree.module_expr_desc =
  1. | Pmod_ident of Longident_visitors.longident_t Asttypes.loc
  2. | Pmod_structure of pt_structure
  3. | Pmod_functor of string Asttypes.loc * pt_module_type option * pt_module_expr
  4. | Pmod_apply of pt_module_expr * pt_module_expr
  5. | Pmod_constraint of pt_module_expr * pt_module_type
  6. | Pmod_unpack of pt_expression
  7. | Pmod_extension of pt_extension
and pt_structure = pt_structure_item list
and pt_structure_item = Parsetree.structure_item = {
  1. pstr_desc : pt_structure_item_desc;
  2. pstr_loc : Location_visitors.location_t;
}
and pt_structure_item_desc = Parsetree.structure_item_desc =
  1. | Pstr_eval of pt_expression * pt_attributes
  2. | Pstr_value of Asttypes.rec_flag * pt_value_binding list
  3. | Pstr_primitive of pt_value_description
  4. | Pstr_type of Asttypes.rec_flag * pt_type_declaration list
  5. | Pstr_typext of pt_type_extension
  6. | Pstr_exception of pt_type_exception
  7. | Pstr_module of pt_module_binding
  8. | Pstr_recmodule of pt_module_binding list
  9. | Pstr_modtype of pt_module_type_declaration
  10. | Pstr_open of pt_open_declaration
  11. | Pstr_class of pt_class_declaration list
  12. | Pstr_class_type of pt_class_type_declaration list
  13. | Pstr_include of pt_include_declaration
  14. | Pstr_attribute of pt_attribute
  15. | Pstr_extension of pt_extension * pt_attributes
and pt_value_binding = Parsetree.value_binding = {
  1. pvb_pat : pt_pattern;
  2. pvb_expr : pt_expression;
  3. pvb_attributes : pt_attributes;
  4. pvb_loc : Location_visitors.location_t;
}
and pt_module_binding = Parsetree.module_binding = {
  1. pmb_name : string Asttypes.loc;
  2. pmb_expr : pt_module_expr;
  3. pmb_attributes : pt_attributes;
  4. pmb_loc : Location_visitors.location_t;
}
include sig ... end
class virtual +'b iter : object ... end
include sig ... end
class virtual +'c map : object ... end
include sig ... end
class virtual +'b reduce : object ... end
include sig ... end
class +'c iter2 : object ... end
OCaml

Innovation. Community. Security.