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}
|
\camlexample{toplevel}
|
||||||
\caml\camlinput\?[@@@warning "+A"];;
|
\caml\camlinput\?[@@@warning "+A"];;
|
||||||
\endcamlinput\endcaml
|
\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
|
\endcamlinput\camlerror\:Error: This expression has type float but an expression was expected of type
|
||||||
\: int
|
\: int
|
||||||
|
\: Hint: Did you mean to use \textasciigrave\-+.\textquotesingle\-?
|
||||||
\endcamlerror\endcaml
|
\endcamlerror\endcaml
|
||||||
\caml\camlinput\?let f \<x\> = () ;;
|
\caml\camlinput\?let f \<x\> = () ;;
|
||||||
\endcamlinput\camlwarn\:Warning 27: unused variable x.
|
\endcamlinput\camlwarn\:Warning 27: unused variable x.
|
||||||
|
|
|
@ -132,10 +132,12 @@ module Toplevel = struct
|
||||||
if startchar >= 0 then
|
if startchar >= 0 then
|
||||||
locs := (startchar, endchar) :: !locs
|
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 =
|
let printer_register_locs =
|
||||||
{ Location.batch_mode_printer with
|
{ 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 *)
|
(** Capture warnings and keep them in a list *)
|
||||||
let warnings = ref []
|
let warnings = ref []
|
||||||
|
|
Loading…
Reference in New Issue