Add a shim for #ppx directive for 4.02.

The patch that adds it was accepted, but missed the merge window
for 4.02: https://github.com/ocaml/ocaml/pull/54#issuecomment-42351331
This commit is contained in:
Peter Zotov 2014-05-07 00:21:27 +04:00
parent 8c09e086f5
commit 5cda9ffb99
1 changed files with 7 additions and 0 deletions

View File

@ -85,6 +85,13 @@ let parse_input_multi input =
in
(result, Buffer.contents buf)
#if ocaml_version = (4, 02, 0)
(* #ppx missed the 4.02 merge window. :/ *)
let () =
Hashtbl.add Toploop.directive_table "ppx"
(Toploop.Directive_string(fun s -> Clflags.all_ppx := s :: !Clflags.all_ppx))
#endif
let parse_and_check input eos_is_error =
let buf = Buffer.create 32 in
let preprocess input =