def pr_table(self, node, *args): if not args: return Span(' ', class_ = 'table') span = Span(class_ = 'table-inner') span.extend([Span(self.pr(arg), class_ = 'table-cell') for arg in args]) return Span(span, class_ = 'table')
def pr_lambda(self, node, parameters, body): rval = Span(Span("λ", class_ = 'lambda-chr'), class_ = 'lambda') rval.extend(Span(name, class_ = 'lambda-param') for name in parameters) rval.append(Span(".", class_ = 'lambda-sep')) rval.append(Span(self.pr(body), class_ = 'lambda-body')) return rval
def pr_begin(self, node, *args): span = Span(class_ = 'begin-inner') span.extend([Span(self.pr(arg), class_ = 'begin-cell') for arg in args]) return Span(span, class_ = 'begin')
def pr_default(self, node, *args): command = node.command rval = Span(command) rval.extend(map(self.pr, args)) return rval