tools/pas2c.hs
changeset 6894 555a8d8db228
parent 6893 69cc0166be8d
child 6895 31def088a870
--- a/tools/pas2c.hs	Thu Apr 19 23:36:20 2012 +0400
+++ b/tools/pas2c.hs	Fri Apr 20 01:50:47 2012 +0400
@@ -439,15 +439,13 @@
             struct2C tvs = do
                 t <- withState' id $ mapM (tvar2C False) tvs
                 return $ text "struct" $+$ braces (nest 4 (vcat . map (<> semi) . concat $ t)) <> semi
-    type2C' (RangeType r) = return (text "<<range type>>" <+>)
+    type2C' (RangeType r) = return (text "int" <+>)
     type2C' (Sequence ids) = do
         is <- mapM (id2C IOInsert . setBaseType bt) ids
         return (text "enum" <+> (braces . vcat . punctuate comma . map (\(a, b) -> a <+> equals <+> text "0x" <> text (showHex b "")) $ zip is [1..]) <+>)
         where
             bt = BTEnum $ map (\(Identifier i _) -> map toLower i) ids
-    type2C' (ArrayDecl Nothing t) = do
-        t' <- type2C t
-        return $ \i -> t' i <> brackets empty
+    type2C' (ArrayDecl Nothing t) = type2C (PointerTo t)
     type2C' (ArrayDecl (Just r) t) = do
         t' <- type2C t
         r' <- initExpr2C (InitRange r)