mte/unikernel/duniverse/ppxlib/test/driver/exception_handling/special_functions.ml
2025-11-11 02:07:51 +01:00

13 lines
420 B
OCaml

open Ppxlib
let expand e = Location.raise_errorf ~loc:e.pexp_loc "error special function"
let expand2 e =
Location.raise_errorf ~loc:e.pexp_loc "second error special function"
let rule = Context_free.Rule.special_function "n_args" expand
let rule2 = Context_free.Rule.special_function "n_args2" expand2;;
Driver.register_transformation ~rules:[ rule; rule2 ] "special_function_demo"
let () = Driver.standalone ()