Skip to content

Commit

Permalink
bugfix for fn
Browse files Browse the repository at this point in the history
  • Loading branch information
molarmanful committed Oct 28, 2022
1 parent 3434c06 commit b1b587e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
7 changes: 7 additions & 0 deletions sclin/src/Scalagen.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package sclin

object Scalagen:

def gen(s: String): String =
val p = Parser.parse(s)
???
13 changes: 7 additions & 6 deletions sclin/src/Types.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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"[…]"
Expand Down

0 comments on commit b1b587e

Please sign in to comment.