All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.piacenti.dslmaker.structures.strategies.pretokenizestrategy.Token.kt Maven / Gradle / Ivy

Go to download

Kotlin multiplatform library to facilitate creation of DSLs with ANTLR or a simple built in parser

There is a newer version: 1.1.55
Show newest version
package piacenti.dslmaker.structures.strategies.pretokenizestrategy

import piacenti.dslmaker.interfaces.TokenDefinition

/**
 * @author Piacenti
 */
@Suppress("unused")
class Token(val definition: TokenDefinition, val value: String, private val untrimmed: String, val startIndex: Int, val endIndex: Int) {

    fun print(): String {
        return untrimmed
    }

    override fun toString(): String {
        return "Token{" +
                "constant=" + definition +
                ", value='" + value + '\''.toString() +
                '}'.toString()
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy