summaryrefslogtreecommitdiff
path: root/src/ast_util.mli
diff options
context:
space:
mode:
Diffstat (limited to 'src/ast_util.mli')
-rw-r--r--src/ast_util.mli16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ast_util.mli b/src/ast_util.mli
index eac0d62e..9dafbcd8 100644
--- a/src/ast_util.mli
+++ b/src/ast_util.mli
@@ -298,7 +298,7 @@ val lexp_to_exp : 'a lexp -> 'a exp
val is_unit_typ : typ -> bool
val is_number : typ -> bool
-val is_reftyp : typ -> bool
+val is_ref_typ : typ -> bool
val is_vector_typ : typ -> bool
val is_bit_typ : typ -> bool
val is_bitvector_typ : typ -> bool
@@ -350,3 +350,17 @@ val pat_ids : 'a pat -> IdSet.t
val subst : id -> 'a exp -> 'a exp -> 'a exp
val hex_to_bin : string -> string
+
+
+(** locate takes an expression and recursively sets the location in
+ every subexpression to the provided location. Expressions build
+ using mk_exp and similar do not have locations, so they can then be
+ annotated as e.g. locate (gen_loc l) (mk_exp ...) where l is the
+ location from which the code is being generated. *)
+val locate : l -> 'a exp -> 'a exp
+
+val locate_pat : l -> 'a pat -> 'a pat
+
+val locate_lexp : l -> 'a lexp -> 'a lexp
+
+val locate_typ : l -> typ -> typ