summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2013-03-04 12:54:57 +0000
committerAlain Frisch <alain@frisch.fr>2013-03-04 12:54:57 +0000
commite58b2cd036cc3d9ef112c1875032913367b5926d (patch)
tree90177938ae6c97d2efd7f6db202bb9d7a2d03717 /tools
parentc8d3ff52a2d136fba898b54b0ff35b523789fd00 (diff)
downloadocaml-e58b2cd036cc3d9ef112c1875032913367b5926d.tar.gz
Continue.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13333 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools')
-rw-r--r--tools/depend.ml10
-rw-r--r--tools/ocamlprof.ml2
-rw-r--r--tools/untypeast.ml4
3 files changed, 10 insertions, 6 deletions
diff --git a/tools/depend.ml b/tools/depend.ml
index 0c15985b8c..2f6d20f088 100644
--- a/tools/depend.ml
+++ b/tools/depend.ml
@@ -251,6 +251,10 @@ and add_module bv modl =
add_module bv modl; add_modtype bv mty
| Pmod_unpack(e) ->
add_expr bv e
+ | Pmod_attribute(modl, _) ->
+ add_module bv modl
+ | Pmod_extension _ ->
+ ()
and add_structure bv item_list =
List.fold_left add_struct_item bv item_list
@@ -281,16 +285,14 @@ and add_struct_item bv item =
bv'
| Pstr_modtype(id, mty) ->
add_modtype bv mty; bv
- | Pstr_open l ->
+ | Pstr_open (l, _attrs) ->
addmodule bv l; bv
| Pstr_class cdl ->
List.iter (add_class_declaration bv) cdl; bv
| Pstr_class_type cdtl ->
List.iter (add_class_type_declaration bv) cdtl; bv
- | Pstr_include modl ->
+ | Pstr_include (modl, _attrs) ->
add_module bv modl; bv
- | Pstr_attribute (e, _) -> add_struct_item bv e
- | Pstr_extension _ -> bv
and add_use_file bv top_phrs =
ignore (List.fold_left add_top_phrase bv top_phrs)
diff --git a/tools/ocamlprof.ml b/tools/ocamlprof.ml
index 83f4abc74f..155c3269b8 100644
--- a/tools/ocamlprof.ml
+++ b/tools/ocamlprof.ml
@@ -359,6 +359,8 @@ and rewrite_mod iflag smod =
| Pmod_apply(smod1, smod2) -> rewrite_mod iflag smod1; rewrite_mod iflag smod2
| Pmod_constraint(smod, smty) -> rewrite_mod iflag smod
| Pmod_unpack(sexp) -> rewrite_exp iflag sexp
+ | Pmod_attribute (smod, _) -> rewrite_mod iflag smod
+ | Pmod_extension _ -> ()
and rewrite_str_item iflag item =
match item.pstr_desc with
diff --git a/tools/untypeast.ml b/tools/untypeast.ml
index 72574ac955..0a0dad3e01 100644
--- a/tools/untypeast.ml
+++ b/tools/untypeast.ml
@@ -64,7 +64,7 @@ and untype_structure_item item =
untype_module_expr mexpr) list)
| Tstr_modtype (_id, name, mtype) ->
Pstr_modtype (name, untype_module_type mtype)
- | Tstr_open (_path, lid) -> Pstr_open (lid)
+ | Tstr_open (_path, lid) -> Pstr_open (lid, [])
| Tstr_class list ->
Pstr_class (List.map (fun (ci, _, _) ->
{ pci_virt = ci.ci_virt;
@@ -87,7 +87,7 @@ and untype_structure_item item =
}
) list)
| Tstr_include (mexpr, _) ->
- Pstr_include (untype_module_expr mexpr)
+ Pstr_include (untype_module_expr mexpr, [])
in
{ pstr_desc = desc; pstr_loc = item.str_loc; }