Token

data class Token<T>(val localPos: Int, val pos: Int, val line: Int, val col: Int, val type: T, val text: String)

Tokens in parsek are represented by this class.

T Typically is an enum type, denoting the token type, mapped from regular expressions in the Lexer.

Constructors

Link copied to clipboard
constructor(localPos: Int, pos: Int, line: Int, col: Int, type: T, text: String)

Properties

Link copied to clipboard
val col: Int
Link copied to clipboard
val line: Int
Link copied to clipboard
Link copied to clipboard
val pos: Int
Link copied to clipboard
Link copied to clipboard
val type: T

Functions

Link copied to clipboard
open override fun toString(): String