Interface IrPrinter

All Known Implementing Classes:
IRTextPrinter

public interface IrPrinter
Minimal printing adapter used by IR nodes to render themselves. The implementation is provided by the TupleExprIRRenderer and takes care of indentation, helper rendering, and child printing. Contract and conventions: - openBlock() and closeBlock() are used by nodes that need to emit a structured block with balanced braces, such as WHERE bodies and subselects. Implementations should ensure braces/indentation are balanced across these calls. - line(String) writes a single logical line with current indentation. - Rendering helpers delegate back into the renderer so IR nodes do not duplicate value/IRI formatting logic.
  • Method Details

    • startLine

      void startLine()
      Start a new logical line and prepare for inline appends. Applies indentation once.
    • append

      void append(String s)
      Append text to the current line (starting a new, indented line if none is active).
    • endLine

      void endLine()
      End the current line (no-op if none is active).
    • line

      void line(String s)
    • openBlock

      void openBlock()
    • closeBlock

      void closeBlock()
    • pushIndent

      void pushIndent()
    • popIndent

      void popIndent()
    • printLines

      void printLines(List<IrNode> lines)
    • convertVarToString

      String convertVarToString(Var v)