package ocp-indent

  1. Overview
  2. Docs
A simple tool to indent OCaml programs

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ocp-indent-1.9.0.tbz
sha256=da4ff552f9fc230d7c07f64a8ef89295907bf8d3c581132f05dcf0dd87a172b3
sha512=d734487162ab1373110a4c4d4f83128b21c39ec2d6e6cd1f9708178b190553cf60faebf62483113ceed490d1b9948c6241e798ea81ee266f3ed7fd8113552684

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

Module NstreamSource

Stream with efficient n-lookup

Sourcetype 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

Sourcetype t
Sourceval 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

Sourceval of_channel : ?start_pos:Pos.Position.t -> in_channel -> t

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

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

Get next token from the filter. Returns None after EOF