Token

data class Token<T>(type: T, value: String, section: Section) : Sectional

A Parser token.

Author

An Tran

Parameters

T

The type of the token.

type

The type of the token.

value

The value of this token.

section

The section of this token.

Constructors

Token
Link copied to clipboard
common
fun <T> Token(type: T, value: String, section: Section)

Functions

span
Link copied to clipboard
common
open fun span(other: Sectional): Section?

Creates a section which spans across this and another section.

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

Returns a string representation of the token.

Properties

section
Link copied to clipboard
common
open override val section: Section
type
Link copied to clipboard
common
val type: T
value
Link copied to clipboard
common
val value: String