RenderingStage

Pipeline stage responsible for rendering the abstract syntax tree (AST) into a text output.

This stage takes an AstRoot (produced by the ParsingStage) as input and produces a CharSequence as output. It uses a NodeRenderer to visit the AST and render it into the target format (e.g., HTML).

Constructors

Link copied to clipboard
constructor(renderer: NodeRenderer)

Properties

Link copied to clipboard

A hook function that is invoked after the stage completes processing.

Functions

Link copied to clipboard

Executes this pipeline stage with the given input and shared data.

Link copied to clipboard

Utility function to execute a pipeline stage that takes Unit as input.

Link copied to clipboard
open fun invokeHook(data: SharedPipelineData, input: AstRoot, output: CharSequence)

Invokes the hook function for this stage, if one is defined.

Link copied to clipboard
open override fun process(input: AstRoot, data: SharedPipelineData): CharSequence

Processes the input I and produces an output O.

Link copied to clipboard
infix fun <A, B, C> PipelineStage<A, B>.then(next: PipelineStage<B, C>): PipelineStage<A, C>

Chains two pipeline stages together to form a new pipeline stage.

Link copied to clipboard

Conditionally chains this pipeline stage with next if it is not null.