def visit_productionlist(self, node: Element) -> None:
    self.visit_literal_block(None)
    names = []
    productionlist = cast(Iterable[addnodes.production], node)
    for production in productionlist:
        names.append(production['tokenname'])
    maxlen = max((len(name) for name in names))
    for production in productionlist:
        if production['tokenname']:
            for id in production.get('ids'):
                self.add_anchor(id, production)
            s = (production['tokenname'].ljust(maxlen) + ' ::=')
        else:
            s = ('%s    ' % (' ' * maxlen))
        self.body.append(self.escape(s))
        self.body.append(self.escape((production.astext() + '\n')))
    self.depart_literal_block(None)
    raise nodes.SkipNode
def visit_productionlist(self, node: Element) -> None:
    self.visit_literal_block(None)
    names = []
    productionlist = cast(Iterable[addnodes.production], node)
    for production in productionlist:
        names.append(production['tokenname'])
    maxlen = max((len(name) for name in names))
    for production in productionlist:
        if production['tokenname']:
            for id in production.get('ids'):
                self.add_anchor(id, production)
            s = (production['tokenname'].ljust(maxlen) + ' ::=')
        else:
            s = ('%s    ' % (' ' * maxlen))
        self.body.append(self.escape(s))
        self.body.append(self.escape((production.astext() + '\n')))
    self.depart_literal_block(None)
    raise nodes.SkipNode