package ocp-indent-nlfork

  1. Overview
  2. Docs

Lexer positions & regions

module Position : sig ... end

Lexer positions

module Region : sig ... end

Lexer regions

Enhanced tokens

type token = {
  1. token : Approx_lexer.token;
  2. between : string;
  3. substr : string;
  4. region : Region.t;
  5. offset : int;
}
type t
val display : Format.formatter -> token -> unit
type snapshot = Approx_lexer.context * Region.t
val of_channel : ?st:snapshot -> in_channel -> t

Creates a stream from a channel. Better if you don't want to block, but less efficient

val of_string : ?st:snapshot -> string -> t

Creates a stream from a string.

val next : t -> (token * t) option

Get next token from the filter. Returns None after EOF

val next_full : t -> (token * snapshot * t) option
module Simple : sig ... end
OCaml

Innovation. Community. Security.