view dmd/StaticAssertStatement.d @ 178:e3afd1303184

Many small bugs fixed Made all classes derive from TObject to detect memory leaks (functionality is disabled for now) Began work on overriding backend memory allocations (to avoid memory leaks)
author korDen
date Sun, 17 Oct 2010 07:42:00 +0400
parents e28b18c23469
children b0d41ff5e0df
line wrap: on
line source

module dmd.StaticAssertStatement;

import dmd.common;
import dmd.Statement;
import dmd.StaticAssert;
import dmd.OutBuffer;
import dmd.BE;
import dmd.HdrGenState;
import dmd.Scope;
import dmd.Loc;

class StaticAssertStatement : Statement
{
    StaticAssert sa;

    this(StaticAssert sa)
	{
		register();
		super(sa.loc);
		this.sa = sa;
	}
	
    override Statement syntaxCopy()
	{
		StaticAssertStatement s = new StaticAssertStatement(cast(StaticAssert)sa.syntaxCopy(null));
		return s;
	}
	
    override Statement semantic(Scope sc)
	{
		sa.semantic2(sc);
		return null;
	}

    override BE blockExit()
    {
    	return BE.BEfallthru;
    }
    
    override void toCBuffer(OutBuffer buf, HdrGenState* hgs)
	{
		assert(false);
	}
}