equal
deleted
inserted
replaced
237 pascal2C (Unit _ interface implementation _ _) = |
237 pascal2C (Unit _ interface implementation _ _) = |
238 liftM2 ($+$) (interface2C interface True) (implementation2C implementation) |
238 liftM2 ($+$) (interface2C interface True) (implementation2C implementation) |
239 |
239 |
240 pascal2C (Program _ implementation mainFunction) = do |
240 pascal2C (Program _ implementation mainFunction) = do |
241 impl <- implementation2C implementation |
241 impl <- implementation2C implementation |
242 [main] <- tvar2C True False True True |
242 main <- liftM head $ tvar2C True False True True |
243 (FunctionDeclaration (Identifier "main" (BTInt True)) False False False (SimpleType $ Identifier "int" (BTInt True)) |
243 (FunctionDeclaration (Identifier "main" (BTInt True)) False False False (SimpleType $ Identifier "int" (BTInt True)) |
244 [VarDeclaration False False ([Identifier "argc" (BTInt True)], SimpleType (Identifier "Integer" (BTInt True))) Nothing |
244 [VarDeclaration False False ([Identifier "argc" (BTInt True)], SimpleType (Identifier "Integer" (BTInt True))) Nothing |
245 , VarDeclaration False False ([Identifier "argv" BTUnknown], SimpleType (Identifier "PPChar" BTUnknown)) Nothing] |
245 , VarDeclaration False False ([Identifier "argv" BTUnknown], SimpleType (Identifier "PPChar" BTUnknown)) Nothing] |
246 (Just (TypesAndVars [], Phrases [mainResultInit, mainFunction]))) |
246 (Just (TypesAndVars [], Phrases [mainResultInit, mainFunction]))) |
247 |
247 |