pa_lettry.ml
1: EXTEND 2: GLOBAL: Pcaml.expr; 3: 4: Pcaml.expr: LEVEL "expr1" [ 5: [ "let"; "try"; o = OPT "rec"; l = LIST1 Pcaml.let_binding SEP "and"; 6: "in"; e = Pcaml.expr; 7: "with"; pwel = LIST1 lettry_case SEP "|" -> 8: <:expr< (try 9: let $opt: o <> None$ $list:l$ in 10: fun () -> $e$ 11: with 12: [ $list:pwel$ ]) () >> ] 13: ]; 14: 15: lettry_case: [ 16: [ p = Pcaml.patt; 17: w = OPT [ "when"; e = Pcaml.expr -> e ]; "->"; 18: e = Pcaml.expr -> (p, Ploc.VaVal w, <:expr< fun () -> $e$ >>) ] 19: ]; 20: END;;
This document was generated using caml2html