package octez-libs

  1. Overview
  2. Docs
type 'a parsing_result = 'a * Tezos_error_monad.Error_monad.error list
val compare : ('a -> 'a -> int) -> 'a parsing_result -> 'a parsing_result -> int
type point = {
  1. point : int;
  2. byte : int;
  3. line : int;
  4. column : int;
}
val point_zero : point
type location = {
  1. start : point;
  2. stop : point;
}
val location_zero : location
val point_encoding : point Data_encoding.encoding
val location_encoding : location Data_encoding.encoding
type token_value =
  1. | String of string
  2. | Bytes of string
  3. | Int of string
  4. | Ident of string
  5. | Annot of string
  6. | Comment of string
  7. | Eol_comment of string
  8. | Semi
  9. | Open_paren
  10. | Close_paren
  11. | Open_brace
  12. | Close_brace
type token = {
  1. token : token_value;
  2. loc : location;
}
val tokenize : string -> token list parsing_result
type node = (location, string) Micheline.node
val min_point : node list -> point

Beginning of a sequence of consecutive primitives

val max_point : node list -> point

End of a sequence of consecutive primitives

val max_annot_length : int
type Tezos_error_monad.Error_monad.error +=
  1. | Invalid_utf8_sequence of point * string
type Tezos_error_monad.Error_monad.error +=
  1. | Unexpected_character of point * string
type Tezos_error_monad.Error_monad.error +=
  1. | Undefined_escape_sequence of point * string
type Tezos_error_monad.Error_monad.error +=
  1. | Missing_break_after_number of point
type Tezos_error_monad.Error_monad.error +=
  1. | Unterminated_string of location
type Tezos_error_monad.Error_monad.error +=
  1. | Unterminated_integer of location
type Tezos_error_monad.Error_monad.error +=
  1. | Invalid_hex_bytes of location
type Tezos_error_monad.Error_monad.error +=
  1. | Unterminated_comment of location
type Tezos_error_monad.Error_monad.error +=
  1. | Annotation_length of location
val parse_toplevel : ?check:bool -> token list -> node list parsing_result
val parse_expression : ?check:bool -> token list -> node parsing_result
val print_location : Format.formatter -> location -> unit
val print_point : Format.formatter -> point -> unit
OCaml

Innovation. Community. Security.