blob: 38803b5ae667ffe99dd570ac8220f12df0aa981f (
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
|
(*i $Id$ i*)
(* Abstract syntax trees. *)
type loc = int * int
type t =
| Node of loc * string * t list
| Nvar of loc * string
| Slam of loc * string option * t
| Num of loc * int
| Id of loc * string
| Str of loc * string
| Path of loc * string list* string
| Dynamic of loc * Dyn.t
(* returns the list of metas occuring in the ast *)
val collect_metas : t -> int list
(* [subst_meta bl ast]: for each binding [(i,c_i)] in [bl],
replace the metavar [?i] by [c_i] in [ast] *)
val subst_meta : (int * t) list -> t -> t
(* hash-consing function *)
val hcons_ast: (string -> string) -> (t -> t) * (loc -> loc)
|