diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/loc.ml | 2 | ||||
| -rw-r--r-- | lib/loc.mli | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/loc.ml b/lib/loc.ml index 57c928bbcb..e87ad132e6 100644 --- a/lib/loc.ml +++ b/lib/loc.ml @@ -33,6 +33,8 @@ let ghost = { fname = ""; line_nb = -1; bol_pos = 0; line_nb_last = -1; bol_pos_last = 0; bp = 0; ep = 0; } +let is_ghost loc = Pervasives.(=) loc ghost (** FIXME *) + let merge loc1 loc2 = if loc1.bp < loc2.bp then if loc1.ep < loc2.ep then { diff --git a/lib/loc.mli b/lib/loc.mli index 0b6ba544d1..c712cddd9e 100644 --- a/lib/loc.mli +++ b/lib/loc.mli @@ -32,6 +32,9 @@ val make_loc : int * int -> t val ghost : t (** Dummy location *) +val is_ghost : t -> bool +(** Test whether the location is meaningful *) + val merge : t -> t -> t val raise : t -> exn -> 'a |
