package ocp-indent-nlfork

  1. Overview
  2. Docs
`ocp-indent` library, "newline tokens" fork

Install

Dune Dependency

Authors

Maintainers

Sources

nlfork-1.5.5.tar.gz
md5=d3ab3fc0b28674bdd2debe9ada1e5564
sha512=dc13da22e286b8f8005b2ec50e790ff48e80535747fe84a832a29879e482de32d14185a30dd1c8eaf7a6e5c6a700144eb862bb7fab4c8e1c99b7eb5fc271a09f

doc/ocp-indent-nlfork.utils/Nstream/index.html

Module Nstream

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.