blob: 07057c968b57c5881c49612c4e3b62d69c739fcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
(* camlp4r *)
(***********************************************************************)
(* *)
(* Camlp4 *)
(* *)
(* Daniel de Rauglaudre, projet Cristal, INRIA Rocquencourt *)
(* *)
(* Copyright 2002 Institut National de Recherche en Informatique et *)
(* Automatique. Distributed only by permission. *)
(* *)
(***********************************************************************)
(* This file has been generated by program: do not edit! *)
type expander =
ExStr of (bool -> string -> string)
| ExAst of ((string -> MLast.expr) * (string -> MLast.patt))
;;
let expanders_table = ref [];;
let default = ref "";;
let translate = ref (fun x -> x);;
let expander_name name =
match !translate name with
"" -> !default
| name -> name
;;
let find name = List.assoc (expander_name name) !expanders_table;;
let add name f = expanders_table := (name, f) :: !expanders_table;;
|