Extended lib_utils/pos.ml{i}. First import of Ligodity. (No "simplify" yet.)
This commit is contained in:
parent
3a7d2a85f1
commit
b69e838bec
@ -119,6 +119,11 @@ let make ~byte ~point_num ~point_bol =
|
||||
(if offsets then self#offset mode else self#column mode)
|
||||
end
|
||||
|
||||
let from_byte byte =
|
||||
let point_num = byte.Lexing.pos_cnum
|
||||
and point_bol = byte.Lexing.pos_bol
|
||||
in make ~byte ~point_num ~point_bol
|
||||
|
||||
let ghost = make ~byte:Lexing.dummy_pos ~point_num:(-1) ~point_bol:(-1)
|
||||
|
||||
let min =
|
||||
|
@ -94,7 +94,8 @@ type pos = t
|
||||
|
||||
(* Constructors *)
|
||||
|
||||
val make : byte:Lexing.position -> point_num:int -> point_bol:int -> t
|
||||
val make : byte:Lexing.position -> point_num:int -> point_bol:int -> t
|
||||
val from_byte : Lexing.position -> t
|
||||
|
||||
(* Special positions *)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user