Skip to content

Syntax printer

syntax_printer

SyntaxPrinter dataclass

Bases: Printer, ColorPrinter

A printer for printing syntax-highlighted mlir code to a terminal.

Source code in xdsl/syntax_printer.py
 7
 8
 9
10
11
12
13
14
class SyntaxPrinter(Printer, ColorPrinter):
    """
    A printer for printing syntax-highlighted mlir code to a terminal.
    """

    def print_ssa_value(self, value: SSAValue) -> str:
        with self.colored(Colors.BRIGHT_MAGENTA):
            return super().print_ssa_value(value)

print_ssa_value(value: SSAValue) -> str

Source code in xdsl/syntax_printer.py
12
13
14
def print_ssa_value(self, value: SSAValue) -> str:
    with self.colored(Colors.BRIGHT_MAGENTA):
        return super().print_ssa_value(value)