tools/pas2c.hs
changeset 7002 5d817ba976f7
parent 6980 07a710e22846
child 7019 333afe233886
--- a/tools/pas2c.hs	Wed May 02 22:12:58 2012 +0400
+++ b/tools/pas2c.hs	Wed May 02 22:51:42 2012 +0400
@@ -376,6 +376,10 @@
          (True, BTInt, [i], Just _) -> do
              i' <- id2CTyped t i
              return [text "enum" <> braces (i' <+> ie)]
+         (True, BTFloat, [i], Just e) -> do
+             i' <- id2CTyped t i
+             ie <- initExpr2C e
+             return [text "#define" <+> i' <+> parens ie <> text "\n"]
          _ -> liftM (map(\i -> t' i <+> ie)) $ mapM (id2CTyped t) ids
     where
     initExpr Nothing = return $ empty