X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;ds=sidebyside;f=AST.icl;h=d2d1a95c6103afe1203f35e664cd3123755ff234;hb=c5fb28639ae923d9b55f5832e45186911e610991;hp=774e158ef5f9d774ad0dd355ce520243d009e6e7;hpb=6b40e2512220130342cf8a883887aed0de72b42b;p=cc1516.git diff --git a/AST.icl b/AST.icl index 774e158..d2d1a95 100644 --- a/AST.icl +++ b/AST.icl @@ -26,6 +26,9 @@ instance print FunDecl where ["{\n\t":printersperse "\n\t" vs] ++ ["\n":printStatements ss 1] ++ ["}\n"] +instance toString FunDecl where + toString fd = concat $ print fd + printStatements :: [Stmt] Int -> [String] printStatements [] i = [] printStatements [s:ss] i = (case s of