# HG changeset patch # User unc0rr # Date 1336760259 -14400 # Node ID 2884c7be6691c587b8e474cb8cdcacd73d2a8ab6 # Parent 4c495c8f02dae4aeee878aae9efd7e0795f8b58b Recognize (hwFloat op int) expressions diff -r 4c495c8f02da -r 2884c7be6691 tools/pas2c.hs --- a/tools/pas2c.hs Fri May 11 22:09:34 2012 +0400 +++ b/tools/pas2c.hs Fri May 11 22:17:39 2012 +0400 @@ -681,6 +681,10 @@ (_, BTRecord t1 _, BTRecord t2 _) -> do i <- op2CTyped op [SimpleType (Identifier t1 undefined), SimpleType (Identifier t2 undefined)] ref2C $ FunCall [expr1, expr2] (SimpleReference i) + (_, BTRecord t1 _, BTInt) -> do + -- aw, "LongInt" here is hwengine-specific hack + i <- op2CTyped op [SimpleType (Identifier t1 undefined), SimpleType (Identifier "LongInt" undefined)] + ref2C $ FunCall [expr1, expr2] (SimpleReference i) (o, _, _) | o `elem` boolOps -> do modify(\s -> s{lastType = BTBool}) return $ parens e1 <+> text o <+> parens e2