summaryrefslogtreecommitdiff
path: root/Language/C.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Language/C.hs')
-rw-r--r--Language/C.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/Language/C.hs b/Language/C.hs
index 9a65115..8b2a9d5 100644
--- a/Language/C.hs
+++ b/Language/C.hs
@@ -44,6 +44,9 @@ data Stmt
| SCall Name [Expr]
-- | @SFor ty i lo hi body@: @for (ty i = lo; i < hi; i++) body@
| SFor Type Name Expr Expr [Stmt]
+ -- | @SWhile pre cond post@: @while (true) { pre; if (!cond) break; post; }@
+ -- Special case if @pre == []@: @while (cond) { post; }
+ | SWhile [Stmt] Expr [Stmt]
| SIf Expr [Stmt] [Stmt]
deriving (Show, Eq)
@@ -56,6 +59,7 @@ data Expr
| EIndex Name Expr
| EPtrTo Expr
| ESizeOf Type
+ | ECast Type Expr
deriving (Show, Eq)