tools/pas2c/Pas2C.hs
changeset 14234 27ae2d3d04b6
parent 14228 b01770d42517
child 14235 3a9e4f35aa68
equal deleted inserted replaced
14233:5b454a442048 14234:27ae2d3d04b6
   777     type2C' (ArrayDecl (Just r1) (ArrayDecl (Just r2) t)) = do
   777     type2C' (ArrayDecl (Just r1) (ArrayDecl (Just r2) t)) = do
   778         t' <- type2C t
   778         t' <- type2C t
   779         lt <- gets lastType
   779         lt <- gets lastType
   780         r1' <- initExpr2C (InitRange r1)
   780         r1' <- initExpr2C (InitRange r1)
   781         r2' <- initExpr2C (InitRange r2)
   781         r2' <- initExpr2C (InitRange r2)
   782         return $ \i -> t' i <> brackets r1' <> brackets r2'
   782         return $ \i -> t' i <> brackets r2' <> brackets r1'
   783     type2C' (ArrayDecl (Just r) t) = do
   783     type2C' (ArrayDecl (Just r) t) = do
   784         t' <- type2C t
   784         t' <- type2C t
   785         lt <- gets lastType
   785         lt <- gets lastType
   786         ft <- case lt of
   786         ft <- case lt of
   787                 -- BTFunction {} -> type2C (PointerTo t)
   787                 -- BTFunction {} -> type2C (PointerTo t)