1
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
行。
如何解決此警告?