package matrix
Module Parser.ParamsSource
The type for the parameters of a control sequence or DCS header.
count p is the number of parameters, such as 0 for CSI m and 2 for CSI ; m.
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.
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.
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.
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.