package fmlib

  1. Overview
  2. Docs
Functional monadic library

Install

Dune Dependency

Authors

Maintainers

Sources

0.1.0.tar.gz
sha256=0558665285e4d7691e5a80c90ab05a7acb86c09f03ceef6589f150f6d3574573
md5=fb61f4d6e7233cf8d1d71758e6110c1e

doc/fmlib.fmlib_parse/Fmlib_parse/Position/index.html

Module Fmlib_parse.PositionSource

Represent a position in a text file.

Sourcetype t

Position in a text file.

Sourcetype range = t * t
Sourceval start : t

Position with points to the start of a textfile.

Sourceval line : t -> int

line pos The line number corresponding to the position p. Note: The first line is line 0.

Sourceval column : t -> int

column pos The column number corresponding to the position p. Note: The first column is column 0.

Sourceval next : char -> t -> t

next next_char pos: Advance the position by using the next character. If the next character is a newline, then the line number is increment and the column number is reset to 0.

Sourceval next_line : t -> t

next_line pos Advance the position to the start of the next line.

Sourceval next_column : t -> t

next_column pos Advance the column position by 1.

OCaml

Innovation. Community. Security.