equal
deleted
inserted
replaced
654 initExpr2C' (InitChar a) = return $ quotes $ text "\\x" <> text (showHex (read a) "") |
654 initExpr2C' (InitChar a) = return $ quotes $ text "\\x" <> text (showHex (read a) "") |
655 initExpr2C' (InitReference i) = id2C IOLookup i |
655 initExpr2C' (InitReference i) = id2C IOLookup i |
656 initExpr2C' (InitRecord fields) = do |
656 initExpr2C' (InitRecord fields) = do |
657 (fs :: [Doc]) <- mapM (\(Identifier a _, b) -> liftM (text "." <> text a <+> equals <+>) $ initExpr2C b) fields |
657 (fs :: [Doc]) <- mapM (\(Identifier a _, b) -> liftM (text "." <> text a <+> equals <+>) $ initExpr2C b) fields |
658 return $ lbrace $+$ (nest 4 . vcat . punctuate comma $ fs) $+$ rbrace |
658 return $ lbrace $+$ (nest 4 . vcat . punctuate comma $ fs) $+$ rbrace |
659 initExpr2C' (InitArray [value]) = initExpr2C value |
659 --initExpr2C' (InitArray [InitRecord fields]) = do |
|
660 -- e <- initExpr2C $ InitRecord fields |
|
661 -- return $ braces $ e |
660 initExpr2C' r@(InitRange (Range i@(Identifier i' _))) = do |
662 initExpr2C' r@(InitRange (Range i@(Identifier i' _))) = do |
661 id2C IOLookup i |
663 id2C IOLookup i |
662 t <- gets lastType |
664 t <- gets lastType |
663 case t of |
665 case t of |
664 BTEnum s -> return . int $ length s |
666 BTEnum s -> return . int $ length s |