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. --- vernac/vernacentries.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vernac') diff --git a/vernac/vernacentries.ml b/vernac/vernacentries.ml index 91965e56b1..d2ba882521 100644 --- a/vernac/vernacentries.ml +++ b/vernac/vernacentries.ml @@ -2175,7 +2175,7 @@ let vernac_load ~st interp fname = let input = let longfname = Loadpath.locate_file fname in let in_chan = open_utf8_file_in longfname in - Pcoq.Parsable.make ~file:(Loc.InFile longfname) (Stream.of_channel in_chan) in + Pcoq.Parsable.make ~loc:(Loc.initial (Loc.InFile longfname)) (Stream.of_channel in_chan) in let rec load_loop ~pstate = try let proof_mode = Option.map (fun _ -> get_default_proof_mode ()) pstate in -- cgit v1.2.3