TypeMatcher

A matcher that matches tokens by their runtime type. Returns true if the token is an instance of K (including any subclass of K).

Parameters

K

The Token type to match

Constructors

Link copied to clipboard
constructor(type: KClass<K>)

Properties

Link copied to clipboard
val type: KClass<K>

The superclass of the token type to match

Functions

Link copied to clipboard
open override fun matches(token: Token): Boolean

Tests whether the given token satisfies this matcher's criterion.