diff options
| author | Jim Fehrle | 2018-07-01 13:02:02 -0700 |
|---|---|---|
| committer | Jim Fehrle | 2018-07-23 20:13:29 -0700 |
| commit | 97069f69ab3a58cc4ccbaa1a835912c6c31dde4d (patch) | |
| tree | 8b762a723d1ff829724c4a912f6a34997ef463c5 /lib/pp_diff.mli | |
| parent | 8de046df97b1ea391a3f3879c20c74d53c9fba48 (diff) | |
Make tokenize_string an optional parameter for diff methods in pp_diffs.
Remove forward reference to lexer.
Diffstat (limited to 'lib/pp_diff.mli')
| -rw-r--r-- | lib/pp_diff.mli | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/pp_diff.mli b/lib/pp_diff.mli index 94b00fed6a..03468271d2 100644 --- a/lib/pp_diff.mli +++ b/lib/pp_diff.mli @@ -33,19 +33,16 @@ Limitations/Possible enhancements: (** Compute the diff between two Pp.t structures and return versions of each with diffs highlighted as (old, new) *) -val diff_pp : Pp.t -> Pp.t -> Pp.t * Pp.t +val diff_pp : ?tokenize_string:(string -> string list) -> Pp.t -> Pp.t -> Pp.t * Pp.t (** Compute the diff between two Pp.t structures and return a highlighted Pp.t. If [show_removed] is true, show separate lines for removals and additions, otherwise only show additions *) -val diff_pp_combined : ?show_removed:bool -> Pp.t -> Pp.t -> Pp.t +val diff_pp_combined : ?tokenize_string:(string -> string list) -> ?show_removed:bool -> Pp.t -> Pp.t -> Pp.t (** Raised if the diff fails *) exception Diff_Failure of string -(* for dependency injection to allow calling the lexer *) -val tokenize_string : (string -> string list) ref - module StringDiff : sig type elem = String.t @@ -69,7 +66,7 @@ If the strings are not lexable, this routine will raise Diff_Failure. Therefore you should catch any exceptions. The workaround for now is for the caller to tokenize the strings itself and then call diff_strs. *) -val diff_str : string -> string -> StringDiff.elem Diff2.edit list +val diff_str : ?tokenize_string:(string -> string list) -> string -> string -> StringDiff.elem Diff2.edit list (** Compute the differences between 2 lists of strings, treating the strings in the lists as indivisible units. |
