BlockNode

A sequence of statements.

Constructors

Link copied to clipboard
fun BlockNode(statements: List<StatementNode>, sourceLocation: SourceLocation)
Link copied to clipboard
fun BlockNode(vararg statements: StatementNode, sourceLocation: SourceLocation)

Functions

Link copied to clipboard
open operator override fun contains(element: StatementNode): Boolean
Link copied to clipboard
open override fun containsAll(elements: Collection<StatementNode>): Boolean
Link copied to clipboard
open override fun copy(children: List<Node>): BlockNode

Returns a shallow copy of this node where the child nodes are replaced by children.

Link copied to clipboard
open fun forEach(p0: Consumer<in StatementNode>)
Link copied to clipboard
open operator override fun get(index: Int): StatementNode
Link copied to clipboard
open override fun indexOf(element: StatementNode): Int
Link copied to clipboard
open override fun isEmpty(): Boolean
Link copied to clipboard
open operator override fun iterator(): Iterator<StatementNode>
Link copied to clipboard
open override fun lastIndexOf(element: StatementNode): Int
Link copied to clipboard
open override fun listIterator(index: Int): ListIterator<StatementNode>
Link copied to clipboard
Link copied to clipboard
open override fun spliterator(): Spliterator<StatementNode>
Link copied to clipboard
Link copied to clipboard
open override fun subList(fromIndex: Int, toIndex: Int): List<StatementNode>
Link copied to clipboard
open fun <T : Any> toArray(p0: IntFunction<Array<T>>): Array<T>
Link copied to clipboard
override fun toDocument(): Document
Link copied to clipboard

Returns a pretty representation of this Node where each descendant is decorated using metadata.

Link copied to clipboard
open override fun toSurfaceNode(metadata: Metadata): BlockNode

Returns a representation of this node in the surface syntax.

Properties

Link copied to clipboard
open override val children: Iterable<StatementNode>

The list of all children nodes. This is empty for leaf nodes.

Link copied to clipboard
open override val size: Int
Link copied to clipboard
open override val sourceLocation: SourceLocation
Link copied to clipboard
val statements: PersistentList<StatementNode>

Extensions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Like Node.copy, but recursively copies all descendant nodes also.

Link copied to clipboard

Returns this node and all its descendants in post order.

Link copied to clipboard

Returns all instances of T contained in this node (which may include this node).

Link copied to clipboard

A FreshNameGenerator that will avoid all Variable names in this node.

Link copied to clipboard
Link copied to clipboard

Combines back ends for different protocols into one that supports all.

Combines multiple protocol composers into one.

fun <K, V> Iterable<Map<K, V>>.unions(): Map<K, V>

Returns the union of all given maps.

fun <T> Iterable<Set<T>>.unions(): Set<T>

Returns the union of all given sets.

Combines code generators for different protocols into one generator that can handle all protocols.

Combines given factories into a single factory that returns protocols from all of them.