Mercurial > projects > ddmd
view dmd/DotTypeExp.d @ 0:10317f0c89a5
Initial commit
author | korDen |
---|---|
date | Sat, 24 Oct 2009 08:42:06 +0400 |
parents | |
children | 2e2a5c3f943a |
line wrap: on
line source
module dmd.DotTypeExp; import dmd.Expression; import dmd.backend.elem; import dmd.UnaExp; import dmd.OutBuffer; import dmd.Loc; import dmd.Scope; import dmd.IRState; import dmd.HdrGenState; import dmd.Dsymbol; import dmd.TOK; import dmd.PREC; import dmd.expression.Util; class DotTypeExp : UnaExp { Dsymbol sym; this(Loc loc, Expression e, Dsymbol s) { super(loc, TOK.TOKdottype, DotTypeExp.sizeof, e); this.sym = s; this.type = s.getType(); } Expression semantic(Scope sc) { version (LOGSEMANTIC) { printf("DotTypeExp.semantic('%s')\n", toChars()); } UnaExp.semantic(sc); return this; } void toCBuffer(OutBuffer buf, HdrGenState* hgs) { expToCBuffer(buf, hgs, e1, PREC.PREC_primary); buf.writeByte('.'); buf.writestring(sym.toChars()); } elem* toElem(IRState* irs) { assert(false); } }