Nodes
Nodes represent some text to be rendered, optionally with styles
Creating a node
The node DSL is what we recommend for most people, it offers an extremely simple way to create a node
If you desire a more manual method you can extend the Node class
Non-terminal nodes are nodes that can have child nodes. These are typically used to layer styles.
nonTerminalNode
startIndex: Int
endIndex: Int
renderer: StyledTextBuilder.(context: Any) -> Unit
ParseSpec
nonTerminalNode
range: IntRange
renderer: StyledTextBuilder.(context: Any) -> Unit
ParseSpec
nodeWithChildren
startIndex: Int
endIndex: Int
renderer: StyledTextBuilder.(context: Any) -> Unit
ParseSpec
nodeWithChildren
range: IntRange
renderer: StyledTextBuilder.(context: Any) -> Unit
ParseSpec
Terminal nodes are used to append some text with any chosen styles, they cannot have any children.
node
startIndex: Int
endIndex: Int
renderer: StyledTextBuilder.(context: Any) -> Unit
ParseSpec
node
range: IntRange
renderer: StyledTextBuilder.(context: Any) -> Unit
ParseSpec
terminalNode
startIndex: Int
endIndex: Int
renderer: StyledTextBuilder.(context: Any) -> Unit
ParseSpec
terminalNode
range: IntRange
renderer: StyledTextBuilder.(context: Any) -> Unit
ParseSpec
Last updated