diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2004-08-20 17:04:35 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2004-08-20 17:04:35 +0000 |
commit | c3a39fc8c84698aa4985c779e16493c2409a0285 (patch) | |
tree | 0454ddf1543d0f6a78f9b6d6fff79ae8080f48e1 /ocamldoc/odoc_to_text.ml | |
parent | 8030a20089b6ed8a7b654c189f00a6f3693f8bce (diff) |
Fusion des modifs de la branche release308 entre 3.08.0 et 3.08.1
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@6612 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_to_text.ml')
-rw-r--r-- | ocamldoc/odoc_to_text.ml | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/ocamldoc/odoc_to_text.ml b/ocamldoc/odoc_to_text.ml index 057b0d89f..1e5717b6b 100644 --- a/ocamldoc/odoc_to_text.ml +++ b/ocamldoc/odoc_to_text.ml @@ -206,24 +206,30 @@ class virtual to_text = (** Get a string for a [Types.class_type] where all idents are relative. *) method normal_class_type m_name t = - (self#relative_idents m_name (Odoc_info.string_of_class_type t)) + self#relative_idents m_name (Odoc_info.string_of_class_type t) (** Get a string for a [Types.module_type] where all idents are relative. *) method normal_module_type ?code m_name t = - (self#relative_module_idents m_name (Odoc_info.string_of_module_type ?code t)) + self#relative_module_idents m_name (Odoc_info.string_of_module_type ?code t) (** Get a string for a type where all idents are relative. *) method normal_type m_name t = - (self#relative_idents m_name (Odoc_info.string_of_type_expr t)) + self#relative_idents m_name (Odoc_info.string_of_type_expr t) (** Get a string for a list of types where all idents are relative. *) method normal_type_list ?par m_name sep t = - (self#relative_idents m_name (Odoc_info.string_of_type_list ?par sep t)) + self#relative_idents m_name (Odoc_info.string_of_type_list ?par sep t) (** Get a string for a list of class or class type type parameters where all idents are relative. *) method normal_class_type_param_list m_name t = - (self#relative_idents m_name (Odoc_info.string_of_class_type_param_list t)) + self#relative_idents m_name (Odoc_info.string_of_class_type_param_list t) + + (** Get a string for the parameters of a class (with arrows) where all idents are relative. *) + method normal_class_params m_name c = + let s = Odoc_info.string_of_class_params c in + self#relative_idents m_name + (Odoc_info.remove_ending_newline s) (** @return [text] value to represent a [Types.type_expr].*) method text_of_type_expr module_name t = @@ -250,6 +256,17 @@ class virtual to_text = method text_of_class_type_param_expr_list module_name l = [ Code (self#normal_class_type_param_list module_name l) ] + (** @return [text] value to represent parameters of a class (with arraows).*) + method text_of_class_params module_name c = + let t = Odoc_info.text_concat + [Newline] + (List.map + (fun s -> [Code s]) + (Str.split (Str.regexp "\n") + (self#normal_class_params module_name c)) + ) + in + t (** @return [text] value to represent a [Types.module_type]. *) method text_of_module_type t = |