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 Summary
Modifier and TypeMethodDescriptionvoidAppend text to the current line (starting a new, indented line if none is active).voidvoidendLine()End the current line (no-op if none is active).voidvoidvoidvoidprintLines(List<IrNode> lines) voidvoidStart a new logical line and prepare for inline appends.
-
Method Details
-
startLine
void startLine()Start a new logical line and prepare for inline appends. Applies indentation once. -
append
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
-
openBlock
void openBlock() -
closeBlock
void closeBlock() -
pushIndent
void pushIndent() -
popIndent
void popIndent() -
printLines
-
convertVarToString
-