# HG changeset patch # User unC0Rr # Date 1692735568 -7200 # Node ID 4d682779bd29a17f81b3308b4ff1b0de35e6100f # Parent 8bb07b0f50ca3d1aca09682240c2c26c44d892a5 Unbreak pas2c build diff -r 8bb07b0f50ca -r 4d682779bd29 tools/pas2c/Pas2C.hs --- a/tools/pas2c/Pas2C.hs Thu Aug 10 20:48:54 2023 -0400 +++ b/tools/pas2c/Pas2C.hs Tue Aug 22 22:19:28 2023 +0200 @@ -715,6 +715,9 @@ liftM (parens . (<> text " + 1")) $ initExpr2C' e initExpr2C' (BuiltInFunction "pred" [e]) = liftM (parens . (<> text " - 1")) $ initExpr2C' e +initExpr2C' (BuiltInFunction "round" [e]) = do + e <- initExpr2C' e + return $ text "(int)" <> parens e initExpr2C' b@(BuiltInFunction _ _) = error $ show b initExpr2C' (InitTypeCast t' i) = do e <- initExpr2C i diff -r 8bb07b0f50ca -r 4d682779bd29 tools/pas2c/PascalBasics.hs --- a/tools/pas2c/PascalBasics.hs Thu Aug 10 20:48:54 2023 -0400 +++ b/tools/pas2c/PascalBasics.hs Tue Aug 22 22:19:28 2023 +0200 @@ -17,7 +17,7 @@ string' = void . string builtin :: [String] -builtin = ["succ", "pred", "low", "high", "ord", "inc", "dec", "exit", "break", "continue", "length", "copy"] +builtin = ["succ", "pred", "low", "high", "ord", "inc", "dec", "exit", "break", "continue", "length", "copy", "round"] pascalLanguageDef :: GenLanguageDef String u Identity pascalLanguageDef