commonMain.com.sunnychung.lib.multiplatform.kotlite.model.Token.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kotlite-interpreter-jvm Show documentation
Show all versions of kotlite-interpreter-jvm Show documentation
A Kotlin Multiplatform library to interpret Kotlite code, which is a subset of Kotlin language, in runtime in a safe way.
The newest version!
package com.sunnychung.lib.multiplatform.kotlite.model
data class Token(val type: TokenType, val value: Any, val position: SourcePosition, val endExclusive: SourcePosition) {
constructor(type: TokenType, value: Any, position: SourcePosition) : this(type, value, position, position.copy(index = position.index + value.toString().length))
}