TokenMatcher

sealed interface TokenMatcher

Defines a criterion for matching tokens.

Implementations of TokenMatcher provide different strategies for determining whether a token should be matched, such as type checking, lexeme comparison, or predicate evaluation.

Inheritors

Functions

Link copied to clipboard
abstract fun matches(token: Token): Boolean

Tests whether the given token satisfies this matcher's criterion.