commonMain.com.sunnychung.lib.multiplatform.kotlite.model.IntValue.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
import com.sunnychung.lib.multiplatform.kotlite.extension.fullClassName
class IntValue(override val value: Int, symbolTable: SymbolTable) : NumberValue, PrimitiveValue(symbolTable) {
override fun primitiveType(rootSymbolTable: SymbolTable) = rootSymbolTable.IntType
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (other !is IntValue) return false
if (value != other.value) return false
return true
}
override fun hashCode(): Int {
return value
}
}