Char

open class Char(val c: Char, name: String? = null) : AbstractLexeme<Token.Generic>

A Lexeme that matches a single specific character c. Matches produced by this Lexeme always have a length of 1.

Constructors

Link copied to clipboard
constructor(c: Char, name: String? = null)

Properties

Link copied to clipboard
val c: Char

The character to match

Link copied to clipboard
open override val defaultFactory: (CharSequence) -> Token.Generic

A default Token factory that creates new instances of T for matches of this Lexeme, given the CharSequence which captures the Token (equal to Token.value).

Link copied to clipboard
open override val name: String?

An optional name for this Lexeme

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
override fun match(): LexemeMatch<Token.Generic>?
Link copied to clipboard
open override fun toString(): String