diff options
| author | Alain Frisch <alain@frisch.fr> | 2013-03-08 14:59:45 +0000 |
|---|---|---|
| committer | Alain Frisch <alain@frisch.fr> | 2013-03-08 14:59:45 +0000 |
| commit | b0987fd69307b9bd08966fa74c0a9547c4d2af31 (patch) | |
| tree | 2758a7868e65842952a622872808b508c16eae99 /tools/depend.ml | |
| parent | 556d070fdbf0cf584f8198bfae3dedf1193ce01a (diff) | |
| download | ocaml-b0987fd69307b9bd08966fa74c0a9547c4d2af31.tar.gz | |
Attributes on expresions (etc) are now stored in the expression record, to facilitate pattern matching on structured fragments of AST while ignoring attributes. Introducing a new Ast_helper module to help creating AST fragments.
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/extension_points@13381 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'tools/depend.ml')
| -rw-r--r-- | tools/depend.ml | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/tools/depend.ml b/tools/depend.ml index 9274459b28..27d5b52040 100644 --- a/tools/depend.ml +++ b/tools/depend.ml @@ -53,7 +53,6 @@ let rec add_type bv ty = fl | Ptyp_poly(_, t) -> add_type bv t | Ptyp_package pt -> add_package_type bv pt - | Ptyp_attribute (e, _) -> add_type bv e | Ptyp_extension _ -> () and add_package_type bv (lid, l) = @@ -124,7 +123,6 @@ let rec add_pattern bv pat = | Ppat_type li -> add bv li | Ppat_lazy p -> add_pattern bv p | Ppat_unpack id -> pattern_bv := StringSet.add id.txt !pattern_bv - | Ppat_attribute (p, _) -> add_pattern bv p | Ppat_extension _ -> () let add_pattern bv pat = @@ -179,7 +177,6 @@ let rec add_expr bv exp = | Pexp_newtype (_, e) -> add_expr bv e | Pexp_pack m -> add_module bv m | Pexp_open (m, e) -> addmodule bv m; add_expr bv e - | Pexp_attribute (e, _) -> add_expr bv e | Pexp_extension _ -> () and add_pat_expr_list bv pel = @@ -206,10 +203,7 @@ and add_modtype bv mty = | (_, Pwith_modsubst (lid)) -> addmodule bv lid) cstrl | Pmty_typeof m -> add_module bv m - | Pmty_attribute(modl, _) -> - add_modtype bv modl - | Pmty_extension _ -> - () + | Pmty_extension _ -> () and add_signature bv = function [] -> () @@ -259,8 +253,6 @@ 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 _ -> () |
