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. --- gramlib/plexing.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gramlib/plexing.ml') diff --git a/gramlib/plexing.ml b/gramlib/plexing.ml index fce5445ad8..c294923a85 100644 --- a/gramlib/plexing.ml +++ b/gramlib/plexing.ml @@ -5,7 +5,7 @@ type pattern = string * string type location_function = int -> Loc.t -type 'te lexer_func = char Stream.t -> 'te Stream.t * location_function +type 'te lexer_func = ?loc:Loc.t -> char Stream.t -> 'te Stream.t * location_function type 'te lexer = { tok_func : 'te lexer_func; -- cgit v1.2.3