diff options
author | Tom Smeding <tom@tomsmeding.com> | 2021-09-25 21:45:43 +0200 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2021-09-25 21:46:10 +0200 |
commit | 57e5bbbbab0d5315c6bba497447ff9bf2487e995 (patch) | |
tree | e505ed9ff97f8822824c5b8d1d7615f5c86f1d65 /Language/C/Print.hs | |
parent | 070772f008bcb5edb63f3f2c2c5f10c4eb9cb008 (diff) |
Lots of stuff; can compile simple single-generate program
Diffstat (limited to 'Language/C/Print.hs')
-rw-r--r-- | Language/C/Print.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Language/C/Print.hs b/Language/C/Print.hs index e075b0e..cc511b2 100644 --- a/Language/C/Print.hs +++ b/Language/C/Print.hs @@ -20,12 +20,12 @@ printFunDef (FunDef rt n as (StExpr ss rete)) = % intercalates ", " [printType t % printString " " % printName an | (t, an) <- as] % printString ") {\n " % addIndent 2 (intercalates "\n" (map printStmt ss)) - % printString "\n return (" % printExpr rete % printString ");\n}" + % printString "\n return (" % printExpr rete % printString ");\n}\n" printFunDef (ProcDef n as ss) = printString "void " % printName n % printString "(" % intercalates ", " [printType t % printString " " % printName an | (t, an) <- as] - % printString ") " % printBlock ss + % printString ") " % printBlock ss % printString "\n" printName :: Name -> PrintS printName (Name s) = printString s |