この関数:
let rec foo () =
try
let line = input_line stdin in
(try
Mparser.tex_expr lexer_token_safe (Lexing.from_string line);
print_string ("SUCCESS\n")
with
Mtexutil.Illegal_tex_function s -> print_string ("$T" ^ s ^ " " ^ line ^ "\n")
| LexerException s -> print_string ("$L" ^ line ^ "\n")
| Parsing.Parse_error -> print_string ("$P" ^ line ^ "\n")
| _ -> print_string ("$S " ^ line ^ "\n"));
flush stdout;
foo ();
with
End_of_file -> ()
;;
エラーが発生します:
Warning 10: this expression should have type unit.
で始まる行の場合Mparser.tex
。
この警告を解決するにはどうすればよいですか?