Mercurial > projects > dang
diff sema/Visitor.d @ 78:ad956143dcdc new_gen
Parse and gen for dereferences
author | Anders Halager <halager@gmail.com> |
---|---|
date | Fri, 02 May 2008 16:38:31 +0200 |
parents | 381975d76baf |
children | 81813366ef92 |
line wrap: on
line diff
--- a/sema/Visitor.d Fri May 02 15:48:57 2008 +0200 +++ b/sema/Visitor.d Fri May 02 16:38:31 2008 +0200 @@ -70,6 +70,8 @@ return visitIntegerLit(cast(IntegerLit)exp); case ExpType.Negate: return visitNegateExp(cast(NegateExp)exp); + case ExpType.Deref: + return visitDerefExp(cast(DerefExp)exp); case ExpType.AssignExp: return visitAssignExp(cast(AssignExp)exp); case ExpType.CallExp: @@ -257,6 +259,15 @@ return ExpT.init; } + ExpT visitDerefExp(DerefExp exp) + { + visitExp(exp.exp); + static if (is(ExpT == void)) + return; + else + return ExpT.init; + } + ExpT visitIntegerLit(IntegerLit exp) { static if (is(ExpT == void))