package ocp-indent

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

Install

Dune Dependency

Authors

Maintainers

Sources

1.7.0.tar.gz
md5=3bc327e38f453f38494098725c97d2cb
sha512=5b28ae8695612c95cb0f5748de9b9f01d8ef4ad18b31340dc526ccae5fb1b6ee7e12024ff1beb817a43796183a83bca144222ca2d77d7750f2ff56108b5fa350

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

OCaml

Innovation. Community. Security.