summaryrefslogtreecommitdiffstats
path: root/ocamldoc/odoc_analyse.ml
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2014-08-07 09:46:34 +0000
committerAlain Frisch <alain@frisch.fr>2014-08-07 09:46:34 +0000
commit047e09748c91e1d8f80b51edfc33de76fbfc57da (patch)
tree82123e647183306f57d41efcfee9edecafcb169b /ocamldoc/odoc_analyse.ml
parentcc9cbfc75575499e51473984b88327e19e642a00 (diff)
Cherry-pick 15062,15063,15064 from 4.02 (#6497).
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@15068 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_analyse.ml')
-rw-r--r--ocamldoc/odoc_analyse.ml13
1 files changed, 11 insertions, 2 deletions
diff --git a/ocamldoc/odoc_analyse.ml b/ocamldoc/odoc_analyse.ml
index c35259e72..31328838f 100644
--- a/ocamldoc/odoc_analyse.ml
+++ b/ocamldoc/odoc_analyse.ml
@@ -56,6 +56,9 @@ let (++) x f = f x
(** Analysis of an implementation file. Returns (Some typedtree) if
no error occured, else None and an error message is printed.*)
+
+let tool_name = "ocamldoc"
+
let process_implementation_file ppf sourcefile =
init_path ();
let prefixname = Filename.chop_extension sourcefile in
@@ -64,7 +67,10 @@ let process_implementation_file ppf sourcefile =
let inputfile = preprocess sourcefile in
let env = initial_env () in
try
- let parsetree = Pparse.file Format.err_formatter inputfile Parse.implementation ast_impl_magic_number in
+ let parsetree =
+ Pparse.file ~tool_name Format.err_formatter inputfile
+ Parse.implementation ast_impl_magic_number
+ in
let typedtree =
Typemod.type_implementation
sourcefile prefixname modulename env parsetree
@@ -92,7 +98,10 @@ let process_interface_file ppf sourcefile =
let modulename = String.capitalize(Filename.basename prefixname) in
Env.set_unit_name modulename;
let inputfile = preprocess sourcefile in
- let ast = Pparse.file Format.err_formatter inputfile Parse.interface ast_intf_magic_number in
+ let ast =
+ Pparse.file ~tool_name Format.err_formatter inputfile
+ Parse.interface ast_intf_magic_number
+ in
let sg = Typemod.type_interface (initial_env()) ast in
Warnings.check_fatal ();
(ast, sg, inputfile)