diff options
Diffstat (limited to 'toplevel/metasyntax.ml')
-rw-r--r-- | toplevel/metasyntax.ml | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/toplevel/metasyntax.ml b/toplevel/metasyntax.ml index f9b315842..ce7c4f1d0 100644 --- a/toplevel/metasyntax.ml +++ b/toplevel/metasyntax.ml @@ -106,16 +106,17 @@ let split str = (* An infix or a distfix is a pair of a grammar rule and a pretty-printing rule *) +let cache_infix (_,(gr,se)) = + Egrammar.extend_grammar gr; + Esyntax.add_ppobject {sc_univ="constr";sc_entries=se} + let (inInfix, outInfix) = declare_object ("INFIX", - { load_function = (fun _ -> ()); + { load_function = cache_infix; open_function = (fun _ -> ()); - cache_function = - (fun (_,(gr,se)) -> - Egrammar.extend_grammar gr; - Esyntax.add_ppobject {sc_univ="constr";sc_entries=se}); - specification_function = (fun x -> x)}) + cache_function = cache_infix; + specification_function = (fun x -> x)}) let prec_assoc = function | Some(Gramext.RightA) -> (":L",":E") |