SequenceElement

A PatternElement that matches a sequence of elements in order.

SequenceElement succeeds only if all elements match consecutively. Each element's captures are added to the overall capture in the order they are matched. This SequenceElement will fail to match if any one of its constituent elements fail to match in consecutive order.

SequenceElements must contain at least one child element, or IllegalArgumentException will be thrown.

Constructors

Link copied to clipboard
constructor(elements: List<PatternElement>)

Properties

Link copied to clipboard

The list of pattern elements to match in sequence

Functions

Link copied to clipboard
open override fun captureAt(tokenIndex: Int, capture: Node.ParserCapture): Int