matcher

fun matcher(nextState: NextStateBehavior = NoStateChange, matcherBody: (s: String, startAt: Int) -> Token?): TokenMatcher

Simple function to create a matcher. The returned TokenMatcher executes the given lambda and returns its value and nothing else.

The behavior of a matcher is described in TokenMatcher