view dmd/SharedStaticDtorDeclaration.d @ 187:b0d41ff5e0df

Added expandability scheme outlined in http://www.dsource.org/forums/viewtopic.php?t=5659&sid=6f2150ff5b0bffcd47512a6a7608d218
author Abscissa
date Tue, 07 Jun 2011 23:37:34 -0400
parents cd48cb899aee
children eb38fdcb3e62
line wrap: on
line source

module dmd.SharedStaticDtorDeclaration;

import dmd.StaticDtorDeclaration;
import dmd.Loc;
import dmd.Dsymbol;
import dmd.OutBuffer;
import dmd.HdrGenState;
import dmd.FuncDeclaration;

import dmd.DDMDExtensions;

class SharedStaticDtorDeclaration : StaticDtorDeclaration
{
	mixin insertMemberExtension!(typeof(this));

    this(Loc loc, Loc endloc)
	{
	    super(loc, endloc, "_sharedStaticDtor");
	}
	
    Dsymbol syntaxCopy(Dsymbol s)
	{
		assert(!s);
		SharedStaticDtorDeclaration sdd = new SharedStaticDtorDeclaration(loc, endloc);
		return FuncDeclaration.syntaxCopy(sdd);
	}
	
    void toCBuffer(OutBuffer buf, HdrGenState* hgs)
	{
	    if (!hgs.hdrgen)
		{
			buf.writestring("shared ");
			StaticDtorDeclaration.toCBuffer(buf, hgs);
		}
	}

    SharedStaticDtorDeclaration isSharedStaticDtorDeclaration() { return this; }
}