aboutsummaryrefslogtreecommitdiff
path: root/gramlib/plexing.mli
diff options
context:
space:
mode:
authorEnrico Tassi2019-03-25 17:31:55 +0100
committerEnrico Tassi2019-03-29 11:05:17 +0100
commit7eba2dfda86238cb0941edfd7aafb09f566c36d8 (patch)
tree9c1017c90e17d4fc98ecb144ff99d4c8553c1e51 /gramlib/plexing.mli
parent4b9636ffd47ea5a0b99df442047ba03d18422738 (diff)
[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.
Diffstat (limited to 'gramlib/plexing.mli')
-rw-r--r--gramlib/plexing.mli2
1 files changed, 1 insertions, 1 deletions
diff --git a/gramlib/plexing.mli b/gramlib/plexing.mli
index 6139dc4020..f6e4d96b80 100644
--- a/gramlib/plexing.mli
+++ b/gramlib/plexing.mli
@@ -28,7 +28,7 @@ type 'te lexer =
tok_match : pattern -> 'te -> string;
tok_text : pattern -> string;
}
-and 'te lexer_func = char Stream.t -> 'te Stream.t * location_function
+and 'te lexer_func = ?loc:Loc.t -> char Stream.t -> 'te Stream.t * location_function
and location_function = int -> Loc.t
(** The type of a function giving the location of a token in the
source from the token number in the stream (starting from zero). *)