GeneralCollectionValue

data class GeneralCollectionValue<T : OutputValue<*>>(val unwrappedValue: Iterable<T>) : IterableValue<T>

An immutable Value that contains other values of the same type. The kind of ordering is not relevant. When exporting to a node via com.quarkdown.core.function.value.output.node.NodeOutputValueVisitor, this collection is simply converted to a group of nodes.

Parameters

T

the element type of the list

Constructors

Link copied to clipboard
constructor(unwrappedValue: Iterable<T>)

Properties

Link copied to clipboard
open override val destructurableComponents: List<T>

Components that can be the result of a destructuring operation.

Link copied to clipboard
open override val unwrappedValue: Iterable<T>

The wrapped value.

Functions

Link copied to clipboard
open override fun <T> accept(visitor: ExpressionVisitor<T>): T

Accepts a visitor.

open override fun <O> accept(visitor: OutputValueVisitor<O>): O
Link copied to clipboard

Chains two expressions together, which is used in ComposedExpressions.

Link copied to clipboard
open fun destructured(componentCount: Int): List<T>

Destructures this object into a list of components.

Link copied to clipboard
Link copied to clipboard

Groups a sequence of patterns into a single Regex where every capture group is identified by its token type (name). The result is cached so that repeated calls with the same patterns reuse the compiled Regex.

Link copied to clipboard
fun Value<*>.isNone(): Boolean

Whether this value represents a missing/null value, either as a direct NoneValue or as a value wrapping None, NoneValue, or null.

Link copied to clipboard
open operator override fun iterator(): Iterator<T>