Fix tools/caml-tex printing of sub message locations
List printer fields explicitly to avoid the same problem from happening againmaster
parent
d926fdb9f8
commit
a241675676
|
@ -18,9 +18,10 @@
|
|||
\camlexample{toplevel}
|
||||
\caml\camlinput\?[@@@warning "+A"];;
|
||||
\endcamlinput\endcaml
|
||||
\caml\camlinput\?1 + \<2.\> ;;
|
||||
\caml\camlinput\?1 \<+\> \<2.\> ;;
|
||||
\endcamlinput\camlerror\:Error: This expression has type float but an expression was expected of type
|
||||
\: int
|
||||
\: Hint: Did you mean to use \textasciigrave\-+.\textquotesingle\-?
|
||||
\endcamlerror\endcaml
|
||||
\caml\camlinput\?let f \<x\> = () ;;
|
||||
\endcamlinput\camlwarn\:Warning 27: unused variable x.
|
||||
|
|
|
@ -132,10 +132,12 @@ module Toplevel = struct
|
|||
if startchar >= 0 then
|
||||
locs := (startchar, endchar) :: !locs
|
||||
|
||||
(** Record the main location instead of printing it *)
|
||||
(** Record locations in the main error and suberrors without printing them *)
|
||||
let printer_register_locs =
|
||||
{ Location.batch_mode_printer with
|
||||
pp_main_loc = (fun _ _ _ loc -> register_loc loc) }
|
||||
pp_main_loc = (fun _ _ _ loc -> register_loc loc);
|
||||
pp_submsg_loc = (fun _ _ _ loc -> register_loc loc);
|
||||
}
|
||||
|
||||
(** Capture warnings and keep them in a list *)
|
||||
let warnings = ref []
|
||||
|
|
Loading…
Reference in New Issue