Module Ez_toml.Types

type key = string
type key_path = key list
type location = {
  1. file : string;
  2. mutable line_begin : int;
  3. mutable line_end : int;
  4. mutable char_begin : int;
  5. mutable char_end : int;
}
type context =
  1. | InsideTable
  2. | InsideArray
  3. | InsideInlineTable
type format =
  1. | Any
  2. | Inline
  3. | Multiline
  4. | Literal
type config = {
  1. debug : bool;
  2. silent_errors : EzCompat.IntSet.t;
  3. newline : string;
}
type table = node EzCompat.StringMap.t
and node = {
  1. mutable node_comment_before : string list;
  2. mutable node_comment_after : string option;
  3. node_loc : location;
  4. node_format : format;
  5. node_pos : int;
  6. mutable node_value : value;
  7. node_name : key_path;
}
and value =
  1. | Table of table
  2. | Array of node array
  3. | String of string
  4. | Bool of bool
  5. | Int of string
  6. | Float of string
  7. | Date of string
type error =
  1. | Parse_error
  2. | Syntax_error of string
  3. | Invalid_lookup
  4. | Invalid_lookup_in_inline_array
  5. | Key_already_exists of key_path
  6. | Invalid_key_set of key
  7. | Invalid_table of key_path
  8. | Append_item_to_non_array of key_path
  9. | Append_item_to_non_table_array of key_path
  10. | Invalid_escaped_unicode of string
  11. | Expected_error_before_end_of_file of int
  12. | Expected_error_did_not_happen of int
  13. | Expected_error_but_another_error of int * location * int * error
  14. | Forbidden_escaped_character
  15. | Unterminated_string
  16. | Control_characters_must_be_escaped of char
  17. | Duplicate_table_item of key_path
  18. | Type_mismatch of node * string
  19. | Bad_convertion of node * string
  20. | Invalid_lookup_in_empty_array
  21. | Key_already_exists_in_inline_table of key_path
  22. | Invalid_use_of_extension of string
exception Error of location * int * error