Predicate Matcher
class PredicateMatcher<K : Token>(val type: KClass<K>, val predicate: (K) -> Boolean) : TokenElement.TokenMatcher
A matcher that matches tokens by type and a custom predicate.
The token must be of type K (like TypeMatcher), and satisfy the predicate to be matched. The predicate's result is returned.
Parameters
K
The token type to match