diff options
author | Jules Aguillon <jules@j3s.fr> | 2022-02-22 17:45:38 +0100 |
---|---|---|
committer | Jules Aguillon <jules@j3s.fr> | 2022-02-22 17:45:38 +0100 |
commit | 7c263d289517401135acad667eab0130a0fdfefd (patch) | |
tree | 6cb658928540d0e06412cae3bf3f983fbb12d386 /ocamldoc/odoc_info.ml | |
parent | be9a29473688431a3651405b2a456fe42769db84 (diff) | |
download | ocaml-7c263d289517401135acad667eab0130a0fdfefd.tar.gz |
ocamldoc: Remove unused info_string_of_info
This function is no longer uptodate but can be removed instead of fixed.
Diffstat (limited to 'ocamldoc/odoc_info.ml')
-rw-r--r-- | ocamldoc/odoc_info.ml | 84 |
1 files changed, 0 insertions, 84 deletions
diff --git a/ocamldoc/odoc_info.ml b/ocamldoc/odoc_info.ml index be756fb180..bd35de90f0 100644 --- a/ocamldoc/odoc_info.ml +++ b/ocamldoc/odoc_info.ml @@ -210,90 +210,6 @@ let text_of_string = Odoc_text.Texter.text_of_string let text_string_of_text = Odoc_text.Texter.string_of_text - -let escape_arobas s = - let len = String.length s in - let b = Buffer.create len in - for i = 0 to len - 1 do - match s.[i] with - '@' -> Buffer.add_string b "\\@" - | c -> Buffer.add_char b c - done; - Buffer.contents b - -let info_string_of_info i = - let b = Buffer.create 256 in - let p = Printf.bprintf in - ( - match i.i_desc with - None -> () - | Some t -> p b "%s" (escape_arobas (text_string_of_text t)) - ); - List.iter - (fun s -> p b "\n@@author %s" (escape_arobas s)) - i.i_authors; - ( - match i.i_version with - None -> () - | Some s -> p b "\n@@version %s" (escape_arobas s) - ); - ( - (* TODO: escape characters ? *) - let f_see_ref = function - See_url s -> Printf.sprintf "<%s>" s - | See_file s -> Printf.sprintf "'%s'" s - | See_doc s -> Printf.sprintf "\"%s\"" s - in - List.iter - (fun (sref, t) -> - p b "\n@@see %s %s" - (escape_arobas (f_see_ref sref)) - (escape_arobas (text_string_of_text t)) - ) - i.i_sees - ); - ( - match i.i_since with - None -> () - | Some s -> p b "\n@@since %s" (escape_arobas s) - ); - ( - match i.i_deprecated with - None -> () - | Some t -> - p b "\n@@deprecated %s" - (escape_arobas (text_string_of_text t)) - ); - List.iter - (fun (s, t) -> - p b "\n@@param %s %s" - (escape_arobas s) - (escape_arobas (text_string_of_text t)) - ) - i.i_params; - List.iter - (fun (s, t) -> - p b "\n@@raise %s %s" - (escape_arobas s) - (escape_arobas (text_string_of_text t)) - ) - i.i_raised_exceptions; - ( - match i.i_return_value with - None -> () - | Some t -> - p b "\n@@return %s" - (escape_arobas (text_string_of_text t)) - ); - List.iter - (fun (s, t) -> - p b "\n@@%s %s" s - (escape_arobas (text_string_of_text t)) - ) - i.i_custom; - - Buffer.contents b - let info_of_string = Odoc_comments.info_of_string let info_of_comment_file = Odoc_comments.info_of_comment_file |