Pipeline

class Pipeline(context: MutableContext, val options: PipelineOptions, libraries: Set<Library>, renderer: (RendererFactory, Context) -> RenderingComponents, hooks: PipelineHooks? = null)

A representation of the sequential set of actions to perform in order to produce an output artifact from a raw source. Each component of the pipeline takes an input from the output of the previous one.

Parameters

context

initial context data shared across this pipeline, which will is filled with useful information that are handed over to other stages of this pipeline. This allows gathering information on-the-fly without additional visits of the whole tree

libraries

libraries to load and look up functions from

renderer

supplier of the renderer implementation to use, produced by the flavor's RendererFactory with the output attributes of the parser as an argument

hooks

optional actions to run after each stage has been completed

Constructors

Link copied to clipboard
constructor(context: MutableContext, options: PipelineOptions, libraries: Set<Library>, renderer: (RendererFactory, Context) -> RenderingComponents, hooks: PipelineHooks? = null)

Properties

Link copied to clipboard
Link copied to clipboard

A read-only version of the context of this pipeline.

Functions

Link copied to clipboard

Executes the pipeline and calls the given hooks after each stage. This method does not return an output - use hooks to access the output of each stage instead.

Link copied to clipboard

Executes queued function calls and expands their content based on their output.

Link copied to clipboard
fun parse(tokens: List<Token>, context: MutableContext = this.context): Document

Parses a list of tokens into an Abstract Syntax Tree.

Link copied to clipboard

Splits the source code into tokens.