File tree Expand file tree Collapse file tree
backends/eolang/src/main/scala/org/polystat/odin/backend/eolang Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -26,6 +26,15 @@ object ToEO {
2626
2727 implicit class ToEOOps [T , R ](private val node : T ) extends AnyVal {
2828 def toEO (implicit toEO : ToEO [T , R ]): R = ToEO [T , R ].toEO(node)
29+
30+ def toEOPretty (implicit toEO : ToEO [T , InlineOrLines ]): String =
31+ ToEO [T , InlineOrLines ]
32+ .toEO(node)
33+ .fold[String ](
34+ identity,
35+ _.mkString(" \n " )
36+ )
37+
2938 }
3039
3140 }
@@ -39,10 +48,10 @@ object ToEO {
3948
4049 // Program
4150 // ///////////////////////////////////////////////////////////////////
42- implicit val progToEO : ToEO [EOProg [EOExprOnly ], Lines ] =
43- new ToEO [EOProg [EOExprOnly ], Lines ] {
51+ implicit val progToEO : ToEO [EOProg [EOExprOnly ], InlineOrLines ] =
52+ new ToEO [EOProg [EOExprOnly ], InlineOrLines ] {
4453
45- override def toEO (node : EOProg [EOExprOnly ]): Lines = {
54+ override def toEO (node : EOProg [EOExprOnly ]): InlineOrLines = {
4655 val metas = node.metas.toEO.toIterable
4756 val program = node.bnds.flatMap(_.toEO.toIterable)
4857
You can’t perform that action at this time.
0 commit comments