From 9bebbb96e58b3c1b0f7f88ba2af45462eae69b0f Mon Sep 17 00:00:00 2001 From: Emilio Jesus Gallego Arias Date: Sun, 10 Dec 2017 09:26:25 +0100 Subject: [ast] Improve precision of Ast location recognition in serialization. We follow the suggestions in #402 and turn uses of `Loc.located` in `vernac` into `CAst.t`. The impact should be low as this change mostly affects top-level vernaculars. With this change, we are even closer to automatically map a text document to its AST in a programmatic way. --- toplevel/vernac.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toplevel') diff --git a/toplevel/vernac.ml b/toplevel/vernac.ml index 1f681d9cf..92dee84f3 100644 --- a/toplevel/vernac.ml +++ b/toplevel/vernac.ml @@ -170,7 +170,7 @@ let rec interp_vernac ~time ~check ~interactive ~state (loc,com) = (* The -time option is only supported from console-based clients due to the way it prints. *) if time then print_cmd_header ?loc com; - let com = if time then VernacTime(time,(loc,com)) else com in + let com = if time then VernacTime(time, CAst.make ?loc com) else com in interp com with reraise -> (* XXX: In non-interactive mode edit_at seems to do very weird -- cgit v1.2.3