AstBlockNodeComposer

An interface used to intercept block type AstNode rendering logic to inject custom composables for nodes that satisfy predicate.

Functions

Link copied to clipboard
abstract fun <Error class: unknown class>.Compose(astNode: AstNode, visitChildren: @Composable (AstNode) -> Unit)

A composable that's responsible for composing the given astNode if its AstNode.type returned true from predicate. This composable should also decide when and where to render its children, then call visitChildren with a reference to which node's children to visit. This is not an enforced behavior but unknowingly failing to do so can cause loss of information during rendering.

Link copied to clipboard
abstract fun predicate(astBlockNodeType: AstBlockNodeType): Boolean

Returns true if Compose function would handle this astBlockNodeType.