process Token
fun <T> LexerContext<Token<T>>.processToken(type: T, back: Int = 1, length: Int = back, offset: Int = 0)
Content copied to clipboard
Emits a token to the lexer, based off the current state of the LexerContext.
When called with default values, the returned token matches the last character consumed.
Parameters
fun <T> LexerContext<Token<T>>.processToken(type: T, value: String, back: Int = value.length, length: Int = back, offset: Int = 0)
Content copied to clipboard
Emits a token with a value, based off the current state of the LexerContext.
When called with default values, the returned token matches the last N character consumers, where N is value's length.