view dmd/ErrorExp.d @ 0:10317f0c89a5

Initial commit
author korDen
date Sat, 24 Oct 2009 08:42:06 +0400
parents
children 2e2a5c3f943a
line wrap: on
line source

module dmd.ErrorExp;

import dmd.OutBuffer;
import dmd.IntegerExp;
import dmd.Loc;
import dmd.HdrGenState;
import dmd.Type;

/* Use this expression for error recovery.
 * It should behave as a 'sink' to prevent further cascaded error messages.
 */

class ErrorExp : IntegerExp
{
	this()
	{
		super(Loc(0), 0, Type.terror);
	}

	void toCBuffer(OutBuffer buf, HdrGenState* hgs)
	{
		buf.writestring("__error");
	}
}