Mercurial > projects > ddmd
view dmd/LineInitExp.d @ 115:6caaf0256da1
+ interpretation of (non-assign) binary expressions
+ BinExp.isunsigned
+ EqualExp.isBit
author | Trass3r |
---|---|
date | Thu, 02 Sep 2010 01:29:29 +0200 |
parents | e28b18c23469 |
children | 60bb0fe4563e |
line wrap: on
line source
module dmd.LineInitExp; import dmd.common; import dmd.Expression; import dmd.Loc; import dmd.Scope; import dmd.DefaultInitExp; import dmd.IntegerExp; import dmd.TOK; import dmd.Type; class LineInitExp : DefaultInitExp { this(Loc loc) { super(loc, TOK.TOKline, this.sizeof); } override Expression semantic(Scope sc) { type = Type.tint32; return this; } override Expression resolve(Loc loc, Scope sc) { Expression e = new IntegerExp(loc, loc.linnum, Type.tint32); e = e.castTo(sc, type); return e; } }