package camlon

  1. Overview
  2. Docs
type error = [
  1. | `Invalid_construct of Location.t
  2. | `Lexer of Location.t * Lexer.error
  3. | `Parser of Syntaxerr.error
  4. | `Syntax_error of Location.t
  5. | `Exn of exn
]
exception Error of error
val loc_of_error : error -> Location.t

Returns the location of the error. Location.none is returned when the location is unknown.

val format_error : Format.formatter -> error -> unit
val from_lexbuf : ?source:string -> Lexing.lexbuf -> t list

Parsers. They are not re-entrant, since OCaml's lexer is not.

val from_channel : ?source:string -> in_channel -> t list
val from_string : ?source:string -> string -> t list
val from_function : ?source:string -> (bytes -> int -> int) -> t list
OCaml

Innovation. Community. Security.