-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlocation.mli
More file actions
18 lines (13 loc) · 805 Bytes
/
location.mli
File metadata and controls
18 lines (13 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
(** Wraps a content with position informations. We use this module to
associate location within the source file to identifers and expressions. *)
type 'a t
(** [make startpos endpos content] create a location from a starting position [startpos]
and an ending position [endpos] obtained from the lexbuf and a [content] (an identifier or an expression in our case).
We use this to keep track of position informations for error messages. *)
val make : Lexing.position -> Lexing.position -> 'a -> 'a t
(** [content loc] gets the content of location [loc]. *)
val content : 'a t -> 'a
(** [startpos loc] gets the starting position of location [loc]. *)
val startpos : 'a t -> Lexing.position
(** [endpos loc] gets the ending position of location [loc]. *)
val endpos : 'a t -> Lexing.position