AlternationElement

A PatternElement that matches any one of several alternative elements.

AlternationElement tries each element in elements in order until one succeeds. Only the first successful match is captured; remaining alternatives are not tried. If no child elements match, the AlternationElement will also fail to match.

AlternationElements 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 alternative pattern elements

Functions

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