This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,14 @@
|
|||
open Ppxlib
|
||||
|
||||
let rules =
|
||||
[
|
||||
Extension.V3.declare "raise" Extension.Context.expression
|
||||
Ast_pattern.(pstr nil)
|
||||
(fun ~ctxt ->
|
||||
let loc = Expansion_context.Extension.extension_point_loc ctxt in
|
||||
Location.raise_errorf ~loc "An exception, raise be!")
|
||||
|> Context_free.Rule.extension;
|
||||
]
|
||||
|
||||
let () = Driver.V2.register_transformation ~rules "raise"
|
||||
let () = Driver.standalone ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue