Scanner

interface Scanner : Iterator<Token>

This interface represents an input stream of Tokens.

The scanner and the parser form together the 'Parse' step in the loading process.

See 3.1. Processes.

Inheritors

Functions

Link copied to clipboard
abstract fun checkToken(vararg choices: Token.ID): Boolean

Check if the next token is one of the given types.

Link copied to clipboard
abstract operator fun hasNext(): Boolean
Link copied to clipboard
abstract operator override fun next(): Token

Returns the next token.

Link copied to clipboard
abstract fun peekToken(): Token

Return the next token, but do not delete it from the stream.

Link copied to clipboard
abstract fun resetDocumentIndex()

Set the document index to 0 after a document end