mirror of
https://github.com/GayPizzaSpecifications/pork.git
synced 2025-09-30 12:11:32 +00:00
15 lines
309 B
Kotlin
15 lines
309 B
Kotlin
package gay.pizza.pork.bytecode
|
|
|
|
import kotlinx.serialization.Serializable
|
|
|
|
@Serializable
|
|
class Op(val code: Opcode, val args: List<UInt>) {
|
|
override fun toString(): String = buildString {
|
|
append(code.name)
|
|
if (args.isNotEmpty()) {
|
|
append(" ")
|
|
append(args.joinToString(" "))
|
|
}
|
|
}
|
|
}
|