package ocamlformat-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type error =
  1. | Illegal_character of char
  2. | Illegal_escape of string * string option
  3. | Reserved_sequence of string * string option
  4. | Unterminated_comment of Ocamlformat_ocaml_common.Location.t
  5. | Unterminated_string
  6. | Unterminated_string_in_comment of Ocamlformat_ocaml_common.Location.t * Ocamlformat_ocaml_common.Location.t
  7. | Empty_character_literal
  8. | Keyword_as_label of string
  9. | Capitalized_label of string
  10. | Invalid_literal of string
  11. | Invalid_directive of string * string option
  12. | Invalid_encoding of string
  13. | Invalid_char_in_ident of Ocamlformat_parser_shims.Uchar.t
  14. | Non_lowercase_delimiter of string
  15. | Capitalized_raw_identifier of string
  16. | Unknown_keyword of string
val all_keywords : (string * Parser.token * (int * int) option) list
val keyword_table : (string, Parser.token option) Hashtbl.t
val populate_keywords : ((int * int) option * string list) -> unit
val string_buffer : Buffer.t
val reset_string_buffer : unit -> unit
val get_stored_string : unit -> string
val store_string_char : char -> unit
val store_string_utf_8_uchar : Uchar.t -> unit
val store_string : string -> unit
val store_substring : string -> pos:int -> len:int -> unit
val store_lexeme : Lexing.lexbuf -> unit
val store_normalized_newline : string -> unit
val comment_start_loc : Ocamlformat_ocaml_common.Location.t list ref
val in_comment : unit -> bool
val is_in_string : bool ref
val in_string : unit -> bool
val print_warnings : bool ref
val store_escaped_char : Lexing.lexbuf -> char -> unit
val store_escaped_uchar : Lexing.lexbuf -> Uchar.t -> unit
val compute_quoted_string_idloc : Ocamlformat_ocaml_common.Location.t -> int -> string -> Ocamlformat_ocaml_common.Location.t
val error : Lexing.lexbuf -> error -> 'a
val digit_value : char -> int
val num_value : Lexing.lexbuf -> base:int -> first:int -> last:int -> int
val char_for_backslash : char -> char
val illegal_escape : Lexing.lexbuf -> string -> 'a
val char_for_decimal_code : Lexing.lexbuf -> int -> char
val char_for_octal_code : Lexing.lexbuf -> int -> char
val char_for_hexadecimal_code : Lexing.lexbuf -> int -> char
val uchar_for_uchar_escape : Lexing.lexbuf -> Ocamlformat_parser_shims.Uchar.t
val validate_encoding : Lexing.lexbuf -> string -> string
val ident_for_extended : Lexing.lexbuf -> string -> string
val validate_delim : Lexing.lexbuf -> string -> string
val validate_ext : Lexing.lexbuf -> string -> string
val lax_delim : string -> string option
val is_keyword : string -> bool
val find_keyword : Lexing.lexbuf -> string -> Parser.token
val check_label_name : ?raw_escape:bool -> Lexing.lexbuf -> string -> unit
val set_lexeme_length : Lexing.lexbuf -> int -> unit
val disambiguate : Lexing.lexbuf -> string -> Parser.token
val try_disambiguate : Lexing.lexbuf -> Parser.token -> Parser.token option
val update_loc : Lexing.lexbuf -> string option -> int -> bool -> int -> unit
val preprocessor : ((unit -> unit) * ((Lexing.lexbuf -> Parser.token) -> Lexing.lexbuf -> Parser.token)) option ref
val escaped_newlines : bool ref
val handle_docstrings : bool ref
val comment_list : (string * Ocamlformat_ocaml_common.Location.t) list ref
val add_comment : (string * Ocamlformat_ocaml_common.Location.t) -> unit
val add_docstring_comment : Docstrings.docstring -> unit
val comments : unit -> (string * Ocamlformat_ocaml_common.Location.t) list
val __ocaml_lex_tables : Stdlib.Lexing.lex_tables
val __ocaml_lex_token_rec : Lexing.lexbuf -> int -> Parser.token
val directive : Lexing.lexbuf -> Parser.token
val __ocaml_lex_directive_rec : Lexing.lexbuf -> int -> Parser.token
val __ocaml_lex_comment_rec : Lexing.lexbuf -> int -> Ocamlformat_ocaml_common.Location.t
val __ocaml_lex_string_rec : Lexing.lexbuf -> int -> Lexing.position
val quoted_string : string -> Lexing.lexbuf -> Lexing.position
val __ocaml_lex_quoted_string_rec : string -> Lexing.lexbuf -> int -> Lexing.position
val skip_hash_bang : Lexing.lexbuf -> unit
val __ocaml_lex_skip_hash_bang_rec : Lexing.lexbuf -> int -> unit
val token_with_comments : Lexing.lexbuf -> Parser.token
type newline_state =
  1. | NoLine
  2. | NewLine
  3. | BlankLine
type doc_state =
  1. | Initial
  2. | After of docstring list
  3. | Before of docstring list * docstring list * docstring list
and docstring = Docstrings.docstring
val init : ?keyword_edition:((int * int) option * string list) -> unit -> unit
val set_preprocessor : (unit -> unit) -> ((Lexing.lexbuf -> Parser.token) -> Lexing.lexbuf -> Parser.token) -> unit
OCaml

Innovation. Community. Security.