Mercurial > projects > dang
diff ast/Stmt.d @ 5:2c5a8f4c254a
Added very simple if support.
* No else
* Still no logical operators, always tests != 0
author | Anders Halager <halager@gmail.com> |
---|---|
date | Fri, 18 Apr 2008 11:46:00 +0200 |
parents | 2168f4cb73f1 |
children | 642c6a998fd9 |
line wrap: on
line diff
--- a/ast/Stmt.d Fri Apr 18 11:07:46 2008 +0200 +++ b/ast/Stmt.d Fri Apr 18 11:46:00 2008 +0200 @@ -11,6 +11,7 @@ Decl, Exp, Return, + If, } class Stmt @@ -55,3 +56,17 @@ public Exp exp; } + +class IfStmt : Stmt +{ + this(Exp cond, Stmt[] then) + { + super(StmtType.If); + this.cond = cond; + this.then = then; + } + + Exp cond; + Stmt[] then; +} +