Skip to content

yex.parse.Parameter

yex.parse.Parameter(ch, location=None) #

Bases: yex.parse.token.Token

A character that precedes the number of a macro parameter.

By default, this is #.

It can only appear in macro parameters or macro definitions.

Source code in yex/parse/token.py
106
107
108
109
110
111
112
113
114
def __init__(self,
             ch: int,
             location: Union['yex.parse.Location', None] = None):

    if type(self)==Token:
        raise yex.exception.ConstructorError()

    self.ch = ch
    self.location = location