ReportVisitor

Visitor interface for the KSL report AST. Each method corresponds to exactly one ReportNode subtype, providing compile-time assurance that every renderer handles every node type.

Structural nodes (ReportNode.Document, ReportNode.Section) have paired enter/exit methods so renderers can emit opening and closing markup around their children. Leaf nodes have a single visit method.

Implement this interface directly for renderers that must handle all node types explicitly. Extend AbstractReportVisitor for renderers that only need to handle a subset — all methods default to no-ops in the abstract base.

Inheritors

Functions

Link copied to clipboard
Link copied to clipboard
abstract fun enterSection(node: ReportNode.Section)
Link copied to clipboard
abstract fun exitDocument(node: ReportNode.Document)
Link copied to clipboard
abstract fun exitSection(node: ReportNode.Section)
Link copied to clipboard
abstract fun visit(node: ReportNode.DataTable)
abstract fun visit(node: ReportNode.Heading)
abstract fun visit(node: ReportNode.PageBreak)
abstract fun visit(node: ReportNode.Paragraph)
abstract fun visit(node: ReportNode.PlotNode)
abstract fun visit(node: ReportNode.RawText)
abstract fun visit(node: ReportNode.StatTable)