Skip to content

\escapechar

yex.keyword.Escapechar(value=None, **kwargs) #

Bases: yex.control.NumberParameter

The symbol we print before control names.

If this is between 0 and 255, we print the character with that codepoint before the names of controls. For example, if the value was 163, and we were printing the name of a control called "fx", we would print "sfx". If it's below 0 or above 255, we don't print any symbol there.

This is the symbol used when we produce the name of a character. For the symbols we accept when we read the name of a character, see the catcodes table. There is nothing requiring agreement between these values in either direction.

The initial value is 92, which produces a backslash.

Source code in yex/control/parameter.py
75
76
77
78
79
80
81
82
83
84
85
86
87
88
def __init__(self, value=None, **kwargs):

    super().__init__(**kwargs)

    if value is not None:
        self._value = value
    elif self.do_not_initialise:
        pass
    elif isinstance(self.initial_value, self.our_type):
        self._value = self.initial_value
    elif isinstance(self.our_type, tuple):
        self._value = self.our_type[0](self.initial_value)
    else:
        self._value = self.our_type(self.initial_value)