diff options
author | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2008-01-28 05:29:20 +0000 |
---|---|---|
committer | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2008-01-28 05:29:20 +0000 |
commit | 3f4a98da0fbf8a87c674d6737d8c6cec7e8567e5 (patch) | |
tree | f5aa13505824d708414ece1f00219b811315c44a /ocamldoc/odoc_comments.mli | |
parent | 30f3fa2c5bc27f8c59930741aa1b6dd5a34a6b40 (diff) | |
download | ocaml-gcaml3090.tar.gz |
3.09.1 updategcaml3090
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml3090@8792 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_comments.mli')
-rw-r--r-- | ocamldoc/odoc_comments.mli | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/ocamldoc/odoc_comments.mli b/ocamldoc/odoc_comments.mli index 0579926a90..b78369d182 100644 --- a/ocamldoc/odoc_comments.mli +++ b/ocamldoc/odoc_comments.mli @@ -16,7 +16,7 @@ val simple_blank : string (** The type of modules in argument to Info_retriever *) -module type Texter = +module type Texter = sig (** Return a text structure from a string. *) val text_of_string : string -> Odoc_types.text @@ -33,21 +33,21 @@ module Basic_info_retriever : val all_special : string -> string -> int * Odoc_types.info list (** [just_after_special file str] return the pair ([length], [info_opt]) - where [info_opt] is the first optional special comment found + where [info_opt] is the first optional special comment found in [str], without any blank line before. [length] is the number of chars from the beginning of [str] to the end of the special comment. *) val just_after_special : string -> string -> int * Odoc_types.info option (** [first_special file str] return the pair ([length], [info_opt]) - where [info_opt] is the first optional special comment found + where [info_opt] is the first optional special comment found in [str]. [length] is the number of chars from the beginning of [str] to the end of the special comment. *) val first_special : string -> string -> int * Odoc_types.info option (** Return a pair [(comment_opt, element_comment_list)], where [comment_opt] is the last special - comment found in the given string and not followed by a blank line, + comment found in the given string and not followed by a blank line, and [element_comment_list] the list of values built from the other special comments found and the given function. *) val get_comments : @@ -55,3 +55,18 @@ module Basic_info_retriever : string -> string -> Odoc_types.info option * 'a list end + +(** [info_of_string s] parses the given string + like a regular ocamldoc comment and return an + {!Odoc_types.info} structure. + @return an empty structure if there was a syntax error. TODO: change this +*) +val info_of_string : string -> Odoc_types.info + +(** [info_of_comment_file file] parses the given file + and return an {!Odoc_types.info} structure. The content of the + file must have the same syntax as the content of a special comment. + @raise Failure is the file could not be opened or there is a + syntax error. +*) +val info_of_comment_file : string -> Odoc_types.info |