File: reconcile.mli

package info (click to toggle)
ppxlib 0.15.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid
  • size: 1,284 kB
  • sloc: ml: 17,184; sh: 149; makefile: 36; python: 36
file content (46 lines) | stat: -rw-r--r-- 830 bytes parent folder | download
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
open! Import
open Utils

module Context : sig
  type 'a t =
    | Extension          of 'a Extension.Context.t
    | Floating_attribute of 'a Attribute.Floating.Context.t
end

module Replacement : sig
  type t

  val make
    :  context:'a Context.t
    -> start:Lexing.position
    -> stop:Lexing.position
    -> repl:'a Context_free.Generated_code_hook.single_or_many
    -> unit
    -> t

  val make_text
    :  start:Lexing.position
    -> stop:Lexing.position
    -> repl:string
    -> unit
    -> t
end

type mode =
  | Using_line_directives
  | Delimiting_generated_blocks

type target =
  | Output of mode
  | Corrected

val reconcile
  :  ?styler:string
  -> Replacement.t list
  -> kind:Kind.t
  -> contents:string
  -> input_filename:string
  -> output:string option
  -> input_name:string
  -> target:target
  -> unit