-
Notifications
You must be signed in to change notification settings - Fork 17
/
source.mli
37 lines (28 loc) · 869 Bytes
/
source.mli
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
28
29
30
31
32
33
34
35
36
37
(*
* (c) 2014 Andreas Rossberg
*)
type pos = {file : string; line : int; column : int}
type region = {left : pos; right : pos}
type ('a, 'b) phrase =
{ at : region;
it : 'a;
mutable sem : 'b option
}
exception Error of region * string
val nowhere_pos : pos
val nowhere_region : region
val string_of_pos : pos -> string
val string_of_region : region -> string
val before : region -> region
val after : region -> region
val span : region list -> region
val (@@) : 'a -> region -> ('a, 'b) phrase
val (@@@) : 'a -> region list -> ('a, 'b) phrase
val (<~) : ('a, 'b) phrase -> 'b -> 'b
val dup : ('a, 'b) phrase -> ('a, 'b) phrase
val at : ('a, 'b) phrase -> region
val it : ('a, 'b) phrase -> 'a
val sem : ('a, 'b) phrase -> 'b
val warn : region -> string -> unit
val error : region -> string -> 'a (* raises Error *)
val indent : string -> string