From 7eba2dfda86238cb0941edfd7aafb09f566c36d8 Mon Sep 17 00:00:00 2001 From: Enrico Tassi Date: Mon, 25 Mar 2019 17:31:55 +0100 Subject: [parser] initialization based on Loc.t rather than Loc.source In this way one can also set the current offsets in a file, useful if you are parsing a Coq fragment within a file instead of a full file starting from the first line. --- lib/loc.mli | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/loc.mli') diff --git a/lib/loc.mli b/lib/loc.mli index 23df1ebd9a..1eb3cc49e8 100644 --- a/lib/loc.mli +++ b/lib/loc.mli @@ -32,6 +32,9 @@ val create : source -> int -> int -> int -> int -> t (** Create a location from a filename, a line number, a position of the beginning of the line, a start and end position *) +val initial : source -> t +(** Create a location corresponding to the beginning of the given source *) + val unloc : t -> int * int (** Return the start and end position of a location *) -- cgit v1.2.3