-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kakadu <Kakadu@pm.me>
- Loading branch information
Showing
10 changed files
with
227 additions
and
126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
(** Copyright 2021-2023, Kakadu. *) | ||
|
||
(** SPDX-License-Identifier: LGPL-3.0-or-later *) | ||
|
||
(** Parser of the diff file. The grammar is similar too | ||
diff ::= ( head chunk* )* | ||
See also [file_head] and [a_chunk]. *) | ||
val parse_whole_file : Types.file_info list Angstrom.t | ||
|
||
(** Main entry point. Uses [parse_whole_file] under the hood *) | ||
val parse_string : string -> (Types.file_info list, string) result | ||
|
||
(** Parse header of the diff file *) | ||
val file_head : (string * string) Angstrom.t | ||
|
||
(** Parses hunk for the file *) | ||
val a_chunk : Types.chunk Angstrom.t | ||
|
||
val recover_lines : string -> (int * (int * int)) list | ||
|
||
(** The call [lookup db ~file ~line] searches in the list of file differences | ||
by a file name [file] and a file line [line] | ||
the corresponding line of in diff file (counting from the beginning of the information about [file]). | ||
Github API requires this information to submit a review *) | ||
val lookup : Types.file_info list -> file:string -> line:int -> int option | ||
|
||
(** Enable or disable trace logging *) | ||
val set_logging : bool -> unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
(** Copyright 2021-2023, Kakadu. *) | ||
|
||
(** SPDX-License-Identifier: LGPL-3.0-or-later *) | ||
|
||
(** [run ?info p] trims line break in the input string and runs parser [p]. *) | ||
val run : ?info:string -> 'a Angstrom.t -> 'a Angstrom.t | ||
|
||
val diff_cmd : unit Angstrom.t | ||
val file_mode : unit Angstrom.t | ||
val similarity : unit Angstrom.t | ||
val rename : unit Angstrom.t | ||
val index : unit Angstrom.t | ||
val remove_file : string Angstrom.t | ||
val add_file : string Angstrom.t | ||
val pos_num : int Angstrom.t | ||
val chunk_head : Types.chunk_info Angstrom.t | ||
val chunk_item : (Types.kind * string) Angstrom.t | ||
val no_new_line_eof : unit Angstrom.t | ||
val set_logging : bool -> unit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.