InlineRecognizer

fun interface InlineRecognizer

A strategy that attempts to produce an inline piece at a position.

Recognizers receive the padded source and an index and never mutate anything, so a failed attempt costs nothing and cannot leave the scan in a wrong place. They are tried in priority order at every index, and the scan moves to the next index when none matches, so the leftmost position wins and, within a position, the highest priority recognizer does.

Inheritors

Functions

Link copied to clipboard
abstract fun recognize(source: CharSequence, index: Int): InlineMatch?