package pa_ppx

  1. Overview
  2. Docs
type context = {
  1. simplest_raw_strings : bool;
  2. line_nb : int Stdlib.ref;
  3. bol_pos : int Stdlib.ref;
  4. bp_offset : int;
  5. line_cnt : int -> char -> unit;
  6. make_lined_loc : (int * int) -> string -> Ploc.t;
}
val make_ctx : Ploc.t -> context
val stream_peek_nth : int -> 'a Stream.t -> 'a option
val err : context -> (int * int) -> string -> 'a
val linedir : int -> char Stream.t -> bool
val linedir_digits : int -> char Stream.t -> bool
val linedir_quote : int -> char Stream.t -> bool
val any_to_nl : Plexing.Lexbuf.t -> char Stream.t -> Plexing.Lexbuf.t
val any : context -> Plexing.Lexbuf.t -> char Stream.t -> Plexing.Lexbuf.t
val skiplws : 'a -> char Stream.t -> 'a
val string : context -> int -> Plexing.Lexbuf.t -> char Stream.t -> Plexing.Lexbuf.t
val rawstring1 : 'a -> (int * string) -> context -> Plexing.Lexbuf.t -> char Stream.t -> 'a * string
val rawstring0 : context -> int -> Plexing.Lexbuf.t -> char Stream.t -> string * string
val add_string : Plexing.Lexbuf.t -> string -> Plexing.Lexbuf.t
val raw_string_starter_p : context -> char Stream.t -> bool
val comment_rawstring : context -> int -> Plexing.Lexbuf.t -> char Stream.t -> Plexing.Lexbuf.t
val comment : context -> int -> Plexing.Lexbuf.t -> char Stream.t -> Plexing.Lexbuf.t
val ws1 : context -> Plexing.Lexbuf.t -> char Stream.t -> Plexing.Lexbuf.t
val ws_star : context -> Plexing.Lexbuf.t -> char Stream.t -> string
val ws_token : context -> char Stream.t -> string
val next_token : context -> char Stream.t -> string * int
val tokenize_all : context -> char Stream.t -> (string * int) list
val string_count : string -> char -> int
val adjust_loc : string -> Ploc.t -> Ploc.t
val tokenize_comment : (string * Ploc.t) -> (string * int) list
OCaml

Innovation. Community. Security.