Apply Pas2C fix suggested by unC0Rr
authorWuzzy <Wuzzy2@mail.ru>
Sat, 01 Dec 2018 23:31:35 +0100
changeset 14362 3baee596a989
parent 14361 c2712b142e9d
child 14363 1f87c7c2b151
Apply Pas2C fix suggested by unC0Rr
tools/pas2c/Pas2C.hs
--- a/tools/pas2c/Pas2C.hs	Sat Dec 01 23:06:28 2018 +0100
+++ b/tools/pas2c/Pas2C.hs	Sat Dec 01 23:31:35 2018 +0100
@@ -239,7 +239,7 @@
 
 pascal2C (Program _ implementation mainFunction) = do
     impl <- implementation2C implementation
-    [main] <- tvar2C True False True True 
+    main <- liftM head $ 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]