--- a/tools/pas2c/Pas2C.hs Wed May 14 22:50:07 2014 +0400
+++ b/tools/pas2c/Pas2C.hs Thu May 15 21:58:37 2014 +0400
@@ -15,7 +15,7 @@
import Data.List (find)
import Numeric
-import PascalParser(pascalUnit)
+import PascalParser
import PascalUnitSyntaxTree
@@ -237,7 +237,11 @@
pascal2C (Program _ implementation mainFunction) = do
impl <- implementation2C implementation
- [main] <- tvar2C True False True True (FunctionDeclaration (Identifier "main" (BTInt True)) False False False (SimpleType $ Identifier "int" (BTInt True)) [VarDeclaration False False ([Identifier "argc" (BTInt True)], SimpleType (Identifier "Integer" (BTInt True))) Nothing, VarDeclaration False False ([Identifier "argv" BTUnknown], SimpleType (Identifier "PPChar" BTUnknown)) Nothing] (Just (TypesAndVars [], mainFunction)))
+ [main] <- tvar2C True False True True
+ (FunctionDeclaration (Identifier "main" (BTInt True)) False False False (SimpleType $ Identifier "int" (BTInt True))
+ [VarDeclaration False False ([Identifier "argc" (BTInt True)], SimpleType (Identifier "Integer" (BTInt True))) Nothing
+ , VarDeclaration False False ([Identifier "argv" BTUnknown], SimpleType (Identifier "PPChar" BTUnknown)) Nothing]
+ (Just (TypesAndVars [], Phrases [mainResultInit, mainFunction])))
return $ impl $+$ main