diff options
author | Damien Doligez <damien.doligez-inria.fr> | 2012-07-26 19:21:54 +0000 |
---|---|---|
committer | Damien Doligez <damien.doligez-inria.fr> | 2012-07-26 19:21:54 +0000 |
commit | 0c3a7de5079529bc99cbc9e68806f1a7021d94ef (patch) | |
tree | 3b973b6db6313c9bb2993b77c925c0dc8b457f7a /ocamldoc/odoc_scan.ml | |
parent | 229044d83a940d855fd9590d9aa76596f8c1a8b9 (diff) |
merge changes from 4.00 branching to 4.00.0 (part 1)
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@12784 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'ocamldoc/odoc_scan.ml')
-rw-r--r-- | ocamldoc/odoc_scan.ml | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/ocamldoc/odoc_scan.ml b/ocamldoc/odoc_scan.ml index 29e1ca272..18a8f117c 100644 --- a/ocamldoc/odoc_scan.ml +++ b/ocamldoc/odoc_scan.ml @@ -28,7 +28,18 @@ class scanner = (** Scan of 'leaf elements'. *) method scan_value (v : Odoc_value.t_value) = () - method scan_type (t : Odoc_type.t_type) = () + + method scan_type_pre (t : Odoc_type.t_type) = true + + method scan_type_recfield t (f : Odoc_type.record_field) = () + method scan_type_const t (f : Odoc_type.variant_constructor) = () + method scan_type (t : Odoc_type.t_type) = + if self#scan_type_pre t then + match t.Odoc_type.ty_kind with + Odoc_type.Type_abstract -> () + | Odoc_type.Type_variant l -> List.iter (self#scan_type_const t) l + | Odoc_type.Type_record l -> List.iter (self#scan_type_recfield t) l + method scan_exception (e : Odoc_exception.t_exception) = () method scan_attribute (a : Odoc_value.t_attribute) = () method scan_method (m : Odoc_value.t_method) = () @@ -45,7 +56,7 @@ class scanner = method scan_class_pre (c : Odoc_class.t_class) = true (** This method scan the elements of the given class. - A VOIR : scan des classes héritées.*) + A VOIR : scan des classes héritées.*) method scan_class_elements c = List.iter (fun ele -> @@ -71,7 +82,7 @@ class scanner = method scan_class_type_pre (ct : Odoc_class.t_class_type) = true (** This method scan the elements of the given class type. - A VOIR : scan des classes héritées.*) + A VOIR : scan des classes héritées.*) method scan_class_type_elements ct = List.iter (fun ele -> |