1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
(** Match source code against generated code *)
open! Import
(** Checks that the given code starts with [expected] followed by [@@@deriving.end] or
[@@@end].
Raises if there is no [@@@deriving.end].
If some items don't match, it calls [mismatch_handler] with the location of the source
items and the expected code.
*)
val match_structure
: pos:Lexing.position
-> expected:structure
-> mismatch_handler:(Location.t -> structure -> unit)
-> structure
-> unit
(** Same for signatures *)
val match_signature
: pos:Lexing.position
-> expected:signature
-> mismatch_handler:(Location.t -> signature -> unit)
-> signature
-> unit
|