Mercurial > projects > ddmd
view dmd/DotTypeExp.d @ 114:e28b18c23469
added a module dmd.common for commonly used stuff
it currently holds code for consistency checking of predefined versions
also added a VisualD project file
author | Trass3r |
---|---|
date | Wed, 01 Sep 2010 18:21:58 +0200 |
parents | 2e2a5c3f943a |
children | 010eb8f0e18d |
line wrap: on
line source
module dmd.DotTypeExp; import dmd.common; 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(); } override Expression semantic(Scope sc) { version (LOGSEMANTIC) { printf("DotTypeExp.semantic('%s')\n", toChars()); } UnaExp.semantic(sc); return this; } override void toCBuffer(OutBuffer buf, HdrGenState* hgs) { expToCBuffer(buf, hgs, e1, PREC.PREC_primary); buf.writeByte('.'); buf.writestring(sym.toChars()); } override elem* toElem(IRState* irs) { assert(false); } }