CollectingContext

inner class CollectingContext(collection: MutableCollection<T>) : LexerContext<T>

Functions

hasNext
Link copied to clipboard
common
open override fun hasNext(): Boolean
Checks if there's more characters ahead.
match
Link copied to clipboard
common
open override fun match(expect: Char): Boolean
Peeks the next character and, if equals the expected character, consumes it.
next
Link copied to clipboard
common
open override fun next(): Char
Returns the next character of the reader.
nextString
Link copied to clipboard
common
open override fun nextString(length: Int): String
Returns a predefined length of characters of the reader, as a String.
parseOnce
Link copied to clipboard
common
open override fun parseOnce(): List<T>
Lexes once and return the processed tokens.
peek
Link copied to clipboard
common
open override fun peek(): Char
Peeks the next character of the reader.
open override fun peek(distance: Int): Char
Peeks a character a distance far away of the reader.
peekString
Link copied to clipboard
common
open override fun peekString(length: Int): String
Peeks a string with a predefined length of the reader.
process
Link copied to clipboard
common
open override fun process(token: T)
Calls the Lexer.parse's token consumer.

Properties

index
Link copied to clipboard
common
open override val index: Int
The current index.
reader
Link copied to clipboard
common
open override val reader: StringReader
This context' reader.
source
Link copied to clipboard
common
open override val source: Source
The original source of this context.