RegexLexer
abstract class RegexLexer(val source: CharSequence, patterns: List<TokenRegexPattern>) : AbstractLexer
A Lexer that identifies tokens by matching Regex patterns.
Tokenization uses an iterative find loop: each iteration calls Regex.find starting from currentIndex, so that walker-driven position advances are respected without restarting the entire regex search.
Parameters
source
the content to be tokenized
patterns
the patterns to search for, in descending order of priority
Inheritors
Properties
Link copied to clipboard
Index of the latest scanned character within source.
Link copied to clipboard