这个功能:
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
。
如何解决此警告?