X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=AST.icl;h=e1f5bc57d1822da7863ca44a31e1bc434a6f467e;hb=f081c2c5e248331eb6e2f090f4afe818fd8259eb;hp=ae4934fbccd5a1f63ee5912860d0dff6ef27f372;hpb=51921a9587d60b6411610845f56d62ebd73f80cb;p=cc1516.git diff --git a/AST.icl b/AST.icl index ae4934f..e1f5bc5 100644 --- a/AST.icl +++ b/AST.icl @@ -51,6 +51,8 @@ printStatements [s:ss] i = (case s of instance print VarDecl where print (VarDecl _ t i e) = maybe ["var"] print t ++ [" ":i:"=":print e] ++ [";"] +instance toString VarDecl where + toString v = concat (print v) instance toString Type where toString t = concat $ print t