package reason

  1. Overview
  2. Docs
type lexing_error =
  1. | Illegal_character of char
  2. | Illegal_escape of string
  3. | Unterminated_comment of Migrate_parsetree.Ast_408.Location.t
  4. | Unterminated_string
  5. | Unterminated_string_in_comment of Migrate_parsetree.Ast_408.Location.t * Migrate_parsetree.Ast_408.Location.t
  6. | Keyword_as_label of string
  7. | Literal_overflow of string
  8. | Invalid_literal of string
type ast_error =
  1. | Not_expecting of Migrate_parsetree.Ast_408.Location.t * string
  2. | Other_syntax_error of string
  3. | Variable_in_scope of Migrate_parsetree.Ast_408.Location.t * string
  4. | Applicative_path of Migrate_parsetree.Ast_408.Location.t
type parsing_error = string
type reason_error =
  1. | Lexing_error of lexing_error
  2. | Parsing_error of parsing_error
  3. | Ast_error of ast_error
val raise_fatal_error : reason_error -> Migrate_parsetree.Ast_408.Location.t -> 'a
val recover_non_fatal_errors : (unit -> 'a) -> ('a, exn) Result.result * (reason_error * Migrate_parsetree.Ast_408.Location.t) list
val recover_parser_error : (Migrate_parsetree.Ast_408.Location.t -> string -> 'a) -> Migrate_parsetree.Ast_408.Location.t -> string -> 'a
OCaml

Innovation. Community. Security.