diff --git a/sclin/src/Scalagen.scala b/sclin/src/Scalagen.scala new file mode 100644 index 0000000..c5e4c85 --- /dev/null +++ b/sclin/src/Scalagen.scala @@ -0,0 +1,7 @@ +package sclin + +object Scalagen: + + def gen(s: String): String = + val p = Parser.parse(s) + ??? diff --git a/sclin/src/Types.scala b/sclin/src/Types.scala index 10ae882..409a9c5 100644 --- a/sclin/src/Types.scala +++ b/sclin/src/Types.scala @@ -26,12 +26,13 @@ enum ANY: case MAP(x) => x.toSeq.map { case (i, a) => i.toString + " " + a.toString } .mkString("\n") - case STR(x) => x - case NUM(x) => x.toString - case CMD(x) => x - case ERR(x) => x.toString - case UN => "" - case _ => join("") + case STR(x) => x + case NUM(x) => x.toString + case FN(_, x) => x.mkString(" ") + case CMD(x) => x + case ERR(x) => x.toString + case UN => "" + case _ => join("") def toForm: String = this match case _: SEQ => s"[…]"