view dmd/DotTypeExp.d @ 72:2e2a5c3f943a

reduced warnings by adding override to the methods think this also normalizes different line endings used all over the place
author Trass3r
date Sat, 28 Aug 2010 16:19:48 +0200
parents 10317f0c89a5
children e28b18c23469
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();
	}

	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);
	}
}