checkToken

abstract fun checkToken(vararg choices: Token.ID): Boolean(source)

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

Return

true if the next token is one of the given types. Returns false if no more tokens are available.

Parameters

choices

token IDs to match with

Throws

Thrown in case of malformed input.


open fun checkToken(choice: Token.ID): Boolean(source)

Check if the next token is the given type.

Return

true if the next token is the given type. Returns false if no more tokens are available.

Parameters

choice

token ID to match with

Throws

Thrown in case of malformed input.