TokenMatcher

abstract class TokenMatcher(nextStateBehavior: NextStateBehavior = NoStateChange)

A token matcher is an object that can determine whether a string at a given offset matches some pattern. The matcher then returns a corresponding token or null if no match is found.

Inheritors

Constructors

Link copied to clipboard
constructor(nextStateBehavior: NextStateBehavior = NoStateChange)

Functions

Link copied to clipboard
abstract fun match(s: String, startAt: Int): MatcherResult

This function determines whether the string s, starting at the index startAt (inclusive), matches some pattern. The exact pattern is dependent on the implementation.