aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/loc.ml
diff options
context:
space:
mode:
authorGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-09-18 18:14:25 +0200
committerGravatar Hugo Herbelin <Hugo.Herbelin@inria.fr>2017-09-18 20:40:28 +0200
commit46a17141e6a19fff9dfeb1ef18cbba054e34e3c3 (patch)
tree32abe045a5f5b7a9e452f53c3dd2eeddaa2a75f1 /lib/loc.ml
parent26b9ad1d0423f8dc1dbd4d90557469db6a5eaa03 (diff)
Reporting locations in error messages about notation formats.
Diffstat (limited to 'lib/loc.ml')
-rw-r--r--lib/loc.ml2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/loc.ml b/lib/loc.ml
index 06da13d44..4a935a9d9 100644
--- a/lib/loc.ml
+++ b/lib/loc.ml
@@ -62,6 +62,8 @@ let merge_opt l1 l2 = match l1, l2 with
let unloc loc = (loc.bp, loc.ep)
+let shift_loc kb kp loc = { loc with bp = loc.bp + kb ; ep = loc.ep + kp }
+
(** Located type *)
type 'a located = t option * 'a