mirror of
https://github.com/mcanlas/6502-opcodes.git
synced 2025-02-06 01:30:03 +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 =
|
||||
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 =
|
||||
val groupCommentLine =
|
||||
"; " + comment
|
||||
@ -62,7 +62,7 @@ case class DefinitionGroup(comment: String, xs: List[Definition[_]]) extends Top
|
||||
.mkString("\n")
|
||||
|
||||
class DefinitionGroupContext:
|
||||
private val xs: ListBuffer[Definition[_]] =
|
||||
private val xs: ListBuffer[Definition[?]] =
|
||||
ListBuffer()
|
||||
|
||||
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:
|
||||
given namedResourceForDefinition[A]: NamedResource[Definition[A]] =
|
||||
new NamedResource[Definition[A]]:
|
||||
def toDefinitions(x: Definition[A]): List[Definition[_]] =
|
||||
def toDefinitions(x: Definition[A]): List[Definition[?]] =
|
||||
List(x)
|
||||
|
||||
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
|
||||
* byte-definitions
|
||||
*/
|
||||
def toDefinitions(x: A): List[Definition[_]]
|
||||
def toDefinitions(x: A): List[Definition[?]]
|
||||
|
Loading…
x
Reference in New Issue
Block a user