ocp-indent-nlfork

ocp-indent library, "newline tokens" fork
IN THIS PACKAGE
Module Nstream
module Position : sig ... end

Lexer positions

module Region : sig ... end

Lexer regions

Enhanced tokens

type token = {
token : Approx_lexer.token;
between : string;
substr : string;
region : Region.t;
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