package matrix

Build not checked
  1. Overview
  2. Docs
Fast, modern terminal toolkit for OCaml

Install

dune-project
 Dependency

Authors

Maintainers

Sources

mosaic-0.2.0.tbz
sha256=ab48bc02082f9c1deea0769a13c2935df529536630745ec3a3d718f59656109b
sha512=c0f3c490e13ca60217d9d59c9bfdf3ada12e1565f04fe2a623e7c94298d519393eabe404e2317726712bf5e7fa860780a07494e77994ac05032e71f535c56910

doc/matrix.ansi/Ansi/Parser/Params/index.html

Module Parser.ParamsSource

Sourcetype t

The type for the parameters of a control sequence or DCS header.

Sourceval count : t -> int

count p is the number of parameters, such as 0 for CSI m and 2 for CSI ; m.

Sourceval pn : t -> int -> default:int -> int

pn p i ~default reads parameter i as a count or a position (ECMA-48 §8.1, Pn). Absent, 0 or i >= count p means default. DEC terminals give 0 the default's meaning for these parameters (VT510 §4.3.3, "A 0 value or omitted parameter indicates a default value"), as does ECMA-48's ZERO DEFAULT MODE for the functions it lists (F.4.2). Reads the first field.

Sourceval ps : t -> int -> default:int -> int

ps p i ~default reads parameter i as a selector (ECMA-48 §8.1, Ps). Absent or i >= count p means default, and 0 is the value 0, as in ED 0 or SGR 0. Reads the first field.

Sourceval value : t -> int -> int option

value p i is the first field of parameter i, None if it is absent or i >= count p. For functions that skip absent parameters, such as SM and RM.

Sourceval fields : t -> int -> int

fields p i is the number of fields of parameter i, such as 1 for 5 and 3 for 5:1:2, and 0 if i >= count p.

Sourceval field : t -> int -> int -> int option

field p i j is field j of parameter i, None if it is absent or out of range. Field 0 is the one value reads.