Mise à jour terminée. Pour connaître les apports de la version 13.8.4 par rapport à notre ancienne version vous pouvez lire les "Release Notes" suivantes :
https://about.gitlab.com/releases/2021/02/11/security-release-gitlab-13-8-4-released/
https://about.gitlab.com/releases/2021/02/05/gitlab-13-8-3-released/

error.mli 2.37 KB
Newer Older
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
(* This module helps report errors and maintains some information
   about the source file that is being read. *)

(* ---------------------------------------------------------------------------- *)

(* Call [set_filename] before lexing and parsing in order to inform
   the module [Error] about the name of the file that is being
   examined. *)

(* TEMPORARY limiter ou supprimer ou commenter cette interface stateful *)

val set_filename: string -> unit

val get_filename: unit -> string

val get_filemark: unit -> Mark.t

val file_contents: string option ref

val get_file_contents: unit -> string

(* ---------------------------------------------------------------------------- *)

(* Logging and log levels. *)

val logG: int -> (out_channel -> unit) -> unit
val logA: int -> (out_channel -> unit) -> unit
val logC: int -> (out_channel -> unit) -> unit

(* ---------------------------------------------------------------------------- *)

(* Errors and warnings. *)

34 35 36
(* [error ps format ...] displays the list of positions [ps], followed with the
   error message [format ...], and exits. The strings "Error: " and "\n" are
   automatically added at the beginning and end of the error message. The
37
   message should begin with a lowercase letter and end with a dot. *)
38

39
val error: Positions.positions -> ('a, out_channel, unit, 'b) format4 -> 'a
40

41
(* [errorp] is like [error], but uses the position range carried by [v]. *)
42

43
val errorp: _ Positions.located -> ('a, out_channel, unit, 'b) format4 -> 'a
44

45 46
(* [signal] is like [error], except it does not exit immediately. It sets a
   flag which can be tested using [errors]. *)
47

48
val signal: Positions.positions -> ('a, out_channel, unit, unit) format4 -> 'a
49 50 51 52 53 54

(* [errors] returns [true] if [signal] was previously called. Together
   [signal] and [errors] allow reporting multiple errors before aborting. *)

val errors: unit -> bool

55 56 57 58
(* [warning] is like [signal], except it does not set a flag. *)

val warning: Positions.positions -> ('a, out_channel, unit, unit) format4 -> 'a

59 60 61 62 63
(* Certain warnings about the grammar can optionally be treated as errors.
   The following function emits a warning or error message, via [warning] or
   [signal]. It does not stop the program; the client must at some point call
   [errors] and stop the program if any errors have been reported. *)

64
val grammar_warning: Positions.positions -> ('a, out_channel, unit, unit) format4 -> 'a
65