Register
yex.control.Register(array, index)
#
Bases: yex.control.control.Unexpandable
A wrapper so we can pass out references to entries in a Array, and have them update the original values.
Source code in yex/control/register.py
19 20 21 | |
__call__(parser)
#
Equivalent to set_from_parser(), if self.array.set_on_call is True; returns self.value if self.array.set_on_call is False.
Note that because the definition of self.value, this may have the side-effect of clearing the register if the array is Box.
Source code in yex/control/register.py
60 61 62 63 64 65 66 67 68 69 70 71 | |
get_the(parser)
#
Returns the list of tokens to use when we're representing this register with \the (see p212ff of the TeΧbook).
It is acceptable to return a string; it will be converted to a list of the appropriate character tokens.
Source code in yex/control/register.py
73 74 75 76 77 78 79 80 81 | |
set_from_parser(parser)
#
Sets the value from the tokeniser "parser".
Source code in yex/control/register.py
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | |