Sys.Signals module for a Variant type of signals (and a set_signal function that...
[ocaml.git] / camlp4 / Camlp4Filters / Camlp4AstLifter.ml
blob335fbb0e2d831a778b8f26ce3b1817fcdc6b08d0
1 (* camlp4r *)
2 (****************************************************************************)
3 (* *)
4 (* Objective Caml *)
5 (* *)
6 (* INRIA Rocquencourt *)
7 (* *)
8 (* Copyright 2006 Institut National de Recherche en Informatique et *)
9 (* en Automatique. All rights reserved. This file is distributed under *)
10 (* the terms of the GNU Library General Public License, with the special *)
11 (* exception on linking described in LICENSE at the top of the Objective *)
12 (* Caml source tree. *)
13 (* *)
14 (****************************************************************************)
16 (* Authors:
17 * - Nicolas Pouillard: initial version
21 open Camlp4;
23 module Id = struct
24 value name = "Camlp4AstLifter";
25 value version = "$Id$";
26 end;
28 module Make (AstFilters : Camlp4.Sig.AstFilters) = struct
29 open AstFilters;
31 module MetaLoc = struct
32 module Ast = Ast;
33 value meta_loc_patt _loc _ = <:patt< loc >>;
34 value meta_loc_expr _loc _ = <:expr< loc >>;
35 end;
36 module MetaAst = Ast.Meta.Make MetaLoc;
38 register_str_item_filter (fun ast ->
39 let _loc = Ast.loc_of_str_item ast in
40 <:str_item< let loc = Loc.ghost in $exp:MetaAst.Expr.meta_str_item _loc ast$ >>);
42 end;
44 let module M = Camlp4.Register.AstFilter Id Make in ();