Example #1
0
 def pr_table(self, node, *args):
     if not args:
         return Span('&nbsp', 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')
Example #2
0
 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
Example #3
0
 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')
Example #4
0
 def pr_default(self, node, *args):
     command = node.command
     rval = Span(command)
     rval.extend(map(self.pr, args))
     return rval