TokenRecognizerMatched

class TokenRecognizerMatched(val recognizer: TokenRecognizer, val tokenType: TokenType, nextStateBehavior: NextStateBehavior = NoStateChange) : TokenMatcher

This class can be used to associate a TokenRecognizer with a token type, forming a complete TokenMatcher

Constructors

Link copied to clipboard
constructor(recognizer: TokenRecognizer, tokenType: TokenType, nextStateBehavior: NextStateBehavior = NoStateChange)

Functions

Link copied to clipboard
open override 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.

Properties

Link copied to clipboard

The recognizer this matcher will use

Link copied to clipboard

The token type to match recognized tokens to