MutableAstAttributes

data class MutableAstAttributes(var root: NestableNode? = null, val properties: MutableAssociatedProperties<Node, Any> = MutableAssociatedProperties(), val thirdPartyPresenceProperties: MutablePropertyContainer<Boolean> = MutablePropertyContainer(), val linkDefinitions: MutableList<LinkDefinition> = mutableListOf(), val functionCalls: MutableList<FunctionCallNode> = mutableListOf(), var tableOfContents: TableOfContents? = null) : AstAttributes

Writeable attributes that are modified during the parsing process, and carry useful information for the next stages of the pipeline. Storing these attributes while parsing prevents a further visit of the final tree.

Parameters

root

the root node of the tree. According to the architecture, this is set right after the parsing stage

linkDefinitions

the defined links, which can be referenced by other nodes

functionCalls

the function calls to be later executed

hasCode

whether there is at least one code block.

hasMath

whether there is at least one math block or inline.

See also

Constructors

Link copied to clipboard
constructor(root: NestableNode? = null, properties: MutableAssociatedProperties<Node, Any> = MutableAssociatedProperties(), thirdPartyPresenceProperties: MutablePropertyContainer<Boolean> = MutablePropertyContainer(), linkDefinitions: MutableList<LinkDefinition> = mutableListOf(), functionCalls: MutableList<FunctionCallNode> = mutableListOf(), tableOfContents: TableOfContents? = null)

Properties

Link copied to clipboard
Link copied to clipboard

Whether there is at least one code block in the AST.

Link copied to clipboard

Whether there is at least one math block or inline in the AST.

Link copied to clipboard

Whether there is at least one Mermaid diagram in the AST.

Link copied to clipboard
Link copied to clipboard

Properties associated with nodes in the AST. These properties enrich the AST by storing additional information about the nodes, such as:

Link copied to clipboard
open override var root: NestableNode?
Link copied to clipboard
open override var tableOfContents: TableOfContents?

The table of contents of all the headings in the document. This is generated by the tree traversal stage of the pipeline.

Link copied to clipboard

Properties associated with third-party elements in the AST. These properties are used to track the presence of third-party elements in the AST, in order to conditionally load third-party libraries in the final artifact to avoid unnecessary bloat and improve performance.

Functions

Link copied to clipboard

Marks the presence of code blocks in the AST if at least one Code block is present in the document.

Link copied to clipboard

Marks the presence of math blocks or inlines in the AST if at least one math element is present in the document.

Link copied to clipboard

Marks the presence of Mermaid diagrams in the AST if at least one diagram is present in the document.

Link copied to clipboard
open override fun of(node: Node): MutablePropertyContainer<Any>
Link copied to clipboard
open override fun toMutable(): MutableAstAttributes