Skip to content

Commit

Permalink
Remove bad handling of expr bodies
Browse files Browse the repository at this point in the history
  • Loading branch information
kalhauge committed Dec 8, 2023
1 parent f5306dd commit cca7c0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Language/C/Pretty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ instance Pretty CStat where
$+$ prettyBody stat
$$ maybeP prettyElse estat
where
prettyBody c@(CCompound _ _ _) = prettyPrec (-1) c
prettyBody nonCompound = prettyPrec (-1) (CCompound [] [CBlockStmt nonCompound] undefined)
prettyBody c = prettyPrec (-1) c
-- prettyBody nonCompound = prettyPrec (-1) (CCompound [] [CBlockStmt nonCompound] undefined)
prettyElse (CIf else_if_expr else_if_stat else_stat _) =
text "else if"
<+> parens (pretty else_if_expr)
Expand Down

0 comments on commit cca7c0b

Please sign in to comment.