File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 11let () =
22 let content = {|
33let () = print_endline " hello" ;;
4+ 1 + 1 ;;
451 + ;;
56Missing_module. f;;
67| } in
@@ -12,10 +13,10 @@ Missing_module.f;;
1213 try
1314 Location. reset () ;
1415 let phr = ! Toploop. parse_toplevel_phrase lexbuf in
15- if not (Toploop. execute_phrase true Format. std_formatter phr) then raise Exit
16+ let res = Toploop. execute_phrase true Format. std_formatter phr in
17+ flush_all () ;
18+ if not res then raise Exit
1619 with
17- | End_of_file ->
18- flush_all () ;
19- exit 0
20+ | End_of_file -> exit 0
2021 | x -> Location. report_exception Format. std_formatter x
2122 done
Original file line number Diff line number Diff line change 11hello
2- Line 3 , characters 2-4:
2+ Line 4 , characters 2-4:
33Error: Syntax error
4- Line 4 , characters 0-16:
4+ Line 5 , characters 0-16:
55Error: Unbound module Missing_module
You can’t perform that action at this time.
0 commit comments