mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-06-12 13:29:32 +00:00
13 lines
309 B
Scala
13 lines
309 B
Scala
package com.htmlism.mos6502.dsl
|
|
|
|
trait DefinitionValue[A]:
|
|
|
|
/**
|
|
* The value as presented in a `define` declaration (i.e. where no alias is possible)
|
|
*/
|
|
def value(x: A): String
|
|
|
|
object DefinitionValue:
|
|
given definitionValueForInt: DefinitionValue[Int] =
|
|
(x: Int) => String.format("$%02x", x)
|