def configure(ctx: PrintContext): ctx.state().set_indent_size(1)
def do_print(self, context: PrintContext) -> str: return "{0} {1}: {2};".format(*[ printer.print(context.create_child()) for printer in self.children() ])
def print_fn(printer: Printer, context: PrintContext) -> str: components = [ child.print(context.create_child()) for child in printer.children() ] return "\n".join(components)
def do_print(self, context: PrintContext) -> str: return "\n".join( printer.print(context.create_child()) for printer in self.children())
def do_print(self, context: PrintContext) -> str: fn_printer, parameter_list_printer = self.children() return "{0}({1})".format( fn_printer.print(context.create_child()), parameter_list_printer.print(context.create_child()))
def do_print(self, context: PrintContext) -> str: block_printer = self.children()[0] return block_printer.print(context.create_child())
def do_print(self, context: PrintContext) -> str: parameter_printers = self.children() return ", ".join([ printer.print(context.create_child()) for printer in parameter_printers ])
def do_print(self, context: PrintContext) -> str: evaluation_printer = self.children()[0] return evaluation_printer.print(context.create_child())
def do_print(self, context: PrintContext) -> str: eval_printer = self.children()[0] return "return {0};".format(eval_printer.print(context.create_child()))
def do_print(self, context: PrintContext) -> str: components = [ printer.print(context.create_child()) for printer in self.children() ] return ", ".join(components)
def do_print(self, context: PrintContext) -> str: components = [ printer.print(context.create_child()) for printer in self.children() ] return "{0}: {1}".format(*components)