token
Creates a token, 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<in StringToken<T>>.token(type: T, value: String, back: Int = value.length, length: Int = back, offset: Int = 0): StringToken<T>
Content copied to clipboard
Creates 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.