package comby-kernel

  1. Overview
  2. Docs
On This Page
  1. Replacement
Legend:
Library
Module
Module type
Parameter
Class
Class type

Replacement

Defines the result of a rewrite operation.

type t = {
  1. range : Match.range;
  2. replacement_content : string;
  3. environment : Match.environment;
}

A replacement consists of the replaced range, the replacement content, and the environment associated with the replacement content.

val to_yojson : t -> Yojson.Safe.json
val of_yojson : Yojson.Safe.json -> (t, string) Core_kernel.Result.t
val to_json : ?path:string -> ?replacements:t list -> ?rewritten_source:string -> diff:string -> unit -> Yojson.Safe.json
type result = {
  1. rewritten_source : string;
  2. in_place_substitutions : t list;
}

A replacement result is the rewritten source, and the replacement fragments.

val result_to_yojson : result -> Yojson.Safe.json
OCaml

Innovation. Community. Security.