package ocp-indent

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Stream with efficient n-lookup

type token = {
  1. region : Pos.Region.t;
  2. token : Approx_lexer.token;
  3. newlines : int;
  4. between : string Lazy.t;
  5. substr : string Lazy.t;
  6. offset : int;
}

Enhanced tokens

type t
val of_string : ?start_pos:Pos.Position.t -> ?start_offset:int -> string -> t

Creates a stream from a string. Make sure you don't change the string in-place after calling of_string, or anything could happen

val of_channel : ?start_pos:Pos.Position.t -> Pervasives.in_channel -> t

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

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

Get next token from the filter. Returns None after EOF

OCaml

Innovation. Community. Security.