execute delayed actions before parsing with camlp4

Ignore-this: 162f06f1949d9af97793705ffd762a7

darcs-hash:20120220100112-c41ad-251c93cbec866030e3d736083db3a974e0bf59bf
This commit is contained in:
Jeremie Dimino 2012-02-20 11:01:12 +01:00
parent dbae1b32bc
commit 40c2801b99
1 changed files with 2 additions and 0 deletions

View File

@ -20,6 +20,8 @@ let print_camlp4_error pp exn =
Format.pp_print_flush pp ()
let parse_toplevel_phrase_camlp4 str eos_is_error =
(* Execute delayed actions now. *)
Register.iter_and_take_callbacks (fun (_, f) -> f ());
let eof = ref false in
try
let token_stream = Gram.filter (Gram.lex_string (Loc.mk UTop.input_name) str) in