diff options
author | Maxence Guesdon <maxence.guesdon@inria.fr> | 2010-05-31 11:52:13 +0000 |
---|---|---|
committer | Maxence Guesdon <maxence.guesdon@inria.fr> | 2010-05-31 11:52:13 +0000 |
commit | ceccfea6b439a338c342dbcfde5f4485a1345631 (patch) | |
tree | 024a65cc7cf1f6a3ad29ea9aec89614e8e854d3b /ocamldoc/odoc_to_text.ml | |
parent | d7b5f7e6cbd9f3b9da64d488c13abc0a95da3e6e (diff) |
PR#4831: handle @before tag in ocamldoc
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@10480 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_to_text.ml')
-rw-r--r-- | ocamldoc/odoc_to_text.ml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/ocamldoc/odoc_to_text.ml b/ocamldoc/odoc_to_text.ml index a3db5bd9b..591f81d61 100644 --- a/ocamldoc/odoc_to_text.ml +++ b/ocamldoc/odoc_to_text.ml @@ -61,6 +61,17 @@ class virtual info = Newline ] + (** @return [text] value to represent the list of "before" information. *) + method text_of_before = function + [] -> [] + | l -> + let f (v, text) = + (Bold [Raw (Printf.sprintf "%s %s " Odoc_messages.before v) ]) :: + text @ + [Newline] + in + List.flatten (List.map f l) + (** @return [text] value for the given list of raised exceptions.*) method text_of_raised_exceptions l = match l with @@ -153,6 +164,7 @@ class virtual info = ) @ (self#text_of_author_list info.i_authors) @ (self#text_of_version_opt info.i_version) @ + (self#text_of_before info.i_before) @ (self#text_of_since_opt info.i_since) @ (self#text_of_raised_exceptions info.i_raised_exceptions) @ (self#text_of_return_opt info.i_return_value) @ |