Source file ppx_here.ml

1
2
3
4
5
6
7
8
9
10
11
12
open Ppxlib

let here =
  Extension.declare "here" Extension.Context.expression
    Ast_pattern.(pstr nil)
    (fun ~loc ~path:_ -> Ppx_here_expander.lift_position ~loc)
;;

let () =
  Driver.register_transformation "here"
    ~extensions:[ here ]
;;