diff --git a/scratchpad/src/main/scala/com/htmlism/scratchpad/CodeGenerator.scala b/scratchpad/src/main/scala/com/htmlism/scratchpad/CodeGenerator.scala index 0e3531c..f900c33 100644 --- a/scratchpad/src/main/scala/com/htmlism/scratchpad/CodeGenerator.scala +++ b/scratchpad/src/main/scala/com/htmlism/scratchpad/CodeGenerator.scala @@ -22,9 +22,21 @@ object CodeGenerator extends App: println println(s" def comment(s: String): Asm$n[$typeParameterList]") println + println(s" def andThen(that: Asm$n[$typeParameterList]): Asm$n[$typeParameterList] =") + println(s" AndThen$n[$typeParameterList](this, that, None)") + println println(s" def widenWith[$nextLetter]: Asm${n + 1}[$typeParameterList, $nextLetter] =") println(s" Asm${n + 1}Instructions(xs, oComment)") println + println( + s"case class AndThen${n}[$typeParameterList](left: Asm$n[$typeParameterList], right: Asm$n[$typeParameterList], oComment: Option[String]) extends Asm${n}[$typeParameterList]:" + ) + println(" def xs: List[String] =") + println(" left.xs ++ right.xs") + println + println(s" def comment(s: String): Asm$n[$typeParameterList] =") + println(" copy(oComment = Some(s))") + println println( s"case class Asm${n}Instructions[$typeParameterList](xs: List[String], oComment: Option[String]) extends Asm${n}[$typeParameterList]:" )