tools/pas2c/Pas2C.hs
changeset 10245 3ccc054c3c3e
parent 10240 bfae7354d42f
child 10497 c7c50f165946
--- 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