mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2024-05-28 21:41:31 +00:00
avoid deprecated syntax
This commit is contained in:
parent
ee87a131ea
commit
fba3e7e44b
|
@ -42,7 +42,7 @@ case class Subroutine(name: String, fragment: AsmFragment, jumpRegistry: ListSet
|
||||||
def toAsm: String =
|
def toAsm: String =
|
||||||
name + ":" + "\n" + fragment.toAsm
|
name + ":" + "\n" + fragment.toAsm
|
||||||
|
|
||||||
case class DefinitionGroup(comment: String, xs: List[Definition[_]]) extends TopLevelAsmDocumentFragment:
|
case class DefinitionGroup(comment: String, xs: List[Definition[?]]) extends TopLevelAsmDocumentFragment:
|
||||||
def toAsm: String =
|
def toAsm: String =
|
||||||
val groupCommentLine =
|
val groupCommentLine =
|
||||||
"; " + comment
|
"; " + comment
|
||||||
|
@ -62,7 +62,7 @@ case class DefinitionGroup(comment: String, xs: List[Definition[_]]) extends Top
|
||||||
.mkString("\n")
|
.mkString("\n")
|
||||||
|
|
||||||
class DefinitionGroupContext:
|
class DefinitionGroupContext:
|
||||||
private val xs: ListBuffer[Definition[_]] =
|
private val xs: ListBuffer[Definition[?]] =
|
||||||
ListBuffer()
|
ListBuffer()
|
||||||
|
|
||||||
def push[A](x: A)(using ev: NamedResource[A]): Unit =
|
def push[A](x: A)(using ev: NamedResource[A]): Unit =
|
||||||
|
@ -85,7 +85,7 @@ case class Definition[A](name: String, x: A, comment: Option[String])(using ev:
|
||||||
object Definition:
|
object Definition:
|
||||||
given namedResourceForDefinition[A]: NamedResource[Definition[A]] =
|
given namedResourceForDefinition[A]: NamedResource[Definition[A]] =
|
||||||
new NamedResource[Definition[A]]:
|
new NamedResource[Definition[A]]:
|
||||||
def toDefinitions(x: Definition[A]): List[Definition[_]] =
|
def toDefinitions(x: Definition[A]): List[Definition[?]] =
|
||||||
List(x)
|
List(x)
|
||||||
|
|
||||||
def apply[A: DefinitionValue](name: String, x: A): Definition[A] =
|
def apply[A: DefinitionValue](name: String, x: A): Definition[A] =
|
||||||
|
|
|
@ -6,4 +6,4 @@ trait NamedResource[A]:
|
||||||
* A `Definable` can emit multiple definitions. Usually in the case of `word`s being split across two
|
* A `Definable` can emit multiple definitions. Usually in the case of `word`s being split across two
|
||||||
* byte-definitions
|
* byte-definitions
|
||||||
*/
|
*/
|
||||||
def toDefinitions(x: A): List[Definition[_]]
|
def toDefinitions(x: A): List[Definition[?]]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user