Mercurial > projects > ddmd
view dmd/DotTypeExp.d @ 156:0c8cc2a10f99
+ ArrayInitializer.toAssocArrayLiteral()
+ FuncDeclaration.isUnique()
+ TypeEnum.alignsize()
+ TypeEnum.toChars()
+ TypeEnum.getProperty()
+ VarExp.equals()
+ expression.Util.fpunique()
* fixed missing default in TypeBasic
author | trass3r |
---|---|
date | Wed, 15 Sep 2010 18:24:39 +0200 |
parents | 010eb8f0e18d |
children | e3afd1303184 |
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; import dmd.backend.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) { // Just a pass-thru to e1 elem *e; //printf("DotTypeExp.toElem() %s\n", toChars()); e = e1.toElem(irs); el_setLoc(e,loc); return e; } }