equal
deleted
inserted
replaced
666 return $ text s |
666 return $ text s |
667 initExpr2C' (InitFloat s) = return $ text s |
667 initExpr2C' (InitFloat s) = return $ text s |
668 initExpr2C' (InitHexNumber s) = return $ text "0x" <> (text . map toLower $ s) |
668 initExpr2C' (InitHexNumber s) = return $ text "0x" <> (text . map toLower $ s) |
669 initExpr2C' (InitString [a]) = return . quotes $ text [a] |
669 initExpr2C' (InitString [a]) = return . quotes $ text [a] |
670 initExpr2C' (InitString s) = return $ strInit s |
670 initExpr2C' (InitString s) = return $ strInit s |
|
671 initExpr2C' (InitPChar s) = return $ doubleQuotes (text $ escapeStr s) |
671 initExpr2C' (InitChar a) = return $ text "0x" <> text (showHex (read a) "") |
672 initExpr2C' (InitChar a) = return $ text "0x" <> text (showHex (read a) "") |
672 initExpr2C' (InitReference i) = id2C IOLookup i |
673 initExpr2C' (InitReference i) = id2C IOLookup i |
673 initExpr2C' (InitRecord fields) = do |
674 initExpr2C' (InitRecord fields) = do |
674 (fs :: [Doc]) <- mapM (\(Identifier a _, b) -> liftM (text "." <> text a <+> equals <+>) $ initExpr2C b) fields |
675 (fs :: [Doc]) <- mapM (\(Identifier a _, b) -> liftM (text "." <> text a <+> equals <+>) $ initExpr2C b) fields |
675 return $ lbrace $+$ (nest 4 . vcat . punctuate comma $ fs) $+$ rbrace |
676 return $ lbrace $+$ (nest 4 . vcat . punctuate comma $ fs) $+$ rbrace |