tools/pas2c/Pas2C.hs
changeset 14228 b01770d42517
parent 13887 5988e73080a3
child 14234 27ae2d3d04b6
--- a/tools/pas2c/Pas2C.hs	Sun Nov 18 12:21:03 2018 -0500
+++ b/tools/pas2c/Pas2C.hs	Sun Nov 18 20:18:32 2018 +0100
@@ -774,6 +774,12 @@
         where
             bt = BTEnum $ map (\(Identifier i _) -> map toLower i) ids
     type2C' (ArrayDecl Nothing t) = type2C (PointerTo t)
+    type2C' (ArrayDecl (Just r1) (ArrayDecl (Just r2) t)) = do
+        t' <- type2C t
+        lt <- gets lastType
+        r1' <- initExpr2C (InitRange r1)
+        r2' <- initExpr2C (InitRange r2)
+        return $ \i -> t' i <> brackets r1' <> brackets r2'
     type2C' (ArrayDecl (Just r) t) = do
         t' <- type2C t
         lt <- gets lastType