This commit is contained in:
parent
aa2ff7b2f0
commit
2f3113f55d
11742 changed files with 1223940 additions and 0 deletions
|
|
@ -0,0 +1,13 @@
|
|||
open Ppxlib
|
||||
|
||||
let rule =
|
||||
let expand ~loc ~path:_ =
|
||||
Location.raise_errorf ~loc "Raising inside the rewriter"
|
||||
in
|
||||
Extension.declare "raise" Extension.Context.expression
|
||||
Ast_pattern.(pstr nil)
|
||||
expand
|
||||
|> Context_free.Rule.extension
|
||||
|
||||
let () = Driver.register_transformation ~rules:[ rule ] "test"
|
||||
let () = Driver.standalone ()
|
||||
Loading…
Add table
Add a link
Reference in a new issue